/* 统一远程办理页：仅定义服务工作区布局，颜色与尺度全部复用群众端 --gov-* Token。 */

body[data-customer-realtime-mode="service-entry"] {
  min-width: 0;
  min-height: 100svh;
  background: var(--gov-page);
}

body[data-customer-realtime-mode="service-entry"] .customer-entry-header {
  position: relative;
  z-index: 40;
}

.customer-service-navigation {
  display: none;
}

.customer-service-mobile-cancel-waiting {
  display: none;
}

.customer-service-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: rgba(10, 20, 36, .48);
}

.customer-service-modal[hidden] {
  display: none;
}

.customer-service-modal-card {
  position: relative;
  width: min(100%, 400px);
  box-sizing: border-box;
  padding: 28px;
  color: var(--gov-text);
  background: var(--gov-surface);
  border: 1px solid var(--gov-border);
  border-radius: var(--gov-radius-6);
  box-shadow: 0 24px 64px rgba(17, 31, 56, .24);
  text-align: center;
}

.customer-service-modal-card h2,
.customer-service-modal-card h3 {
  margin: 14px 0 8px;
  color: var(--gov-text-strong);
  font-size: var(--gov-fs-20);
  line-height: var(--gov-line-tight);
}

.customer-service-modal-card p {
  margin: 0;
  color: var(--gov-text-muted);
  font-size: var(--gov-fs-14);
  line-height: 1.7;
}

.customer-service-modal-icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--gov-text-muted);
  background: transparent;
  border: 0;
  border-radius: var(--gov-radius-4);
  cursor: pointer;
  font: 500 22px/1 var(--gov-font);
}

.customer-service-modal-icon-button:hover {
  color: var(--gov-text-strong);
  background: var(--gov-surface-subtle);
}

.customer-service-modal-icon-button:focus-visible {
  outline: 3px solid rgba(40, 100, 220, .3);
  outline-offset: 2px;
}

.customer-service-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.customer-service-modal-tools {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 2px;
}

.customer-service-modal-symbol {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--gov-brand-700);
  background: var(--gov-brand-50);
  border-radius: 14px;
}

.customer-service-modal-symbol.is-danger {
  color: #c83232;
  background: #fff0f0;
}

.customer-service-modal-symbol svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.customer-service-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--gov-space-3);
  margin-top: var(--gov-space-6);
}

.customer-service-modal-actions .btn {
  min-width: 104px;
}

.customer-service-reject-result .customer-service-modal-card {
  width: min(100%, 420px);
  text-align: left;
}

.customer-service-reject-result .customer-service-modal-symbol {
  display: grid;
  margin-bottom: 16px;
}

.customer-service-reject-result .customer-service-modal-card h2 {
  margin: 0;
}

.customer-service-reject-reason {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--gov-surface-subtle);
  border: 1px solid var(--gov-border);
  border-radius: var(--gov-radius-3);
}

.customer-service-reject-reason h3 {
  margin: 0 0 4px;
  color: var(--gov-text);
  font-size: var(--gov-fs-13);
}

.customer-service-reject-reason p {
  overflow-wrap: anywhere;
}

.customer-service-confirm-end {
  color: #fff;
  background: #c83232;
  border-color: #c83232;
}

.customer-service-confirm-end:hover:not(:disabled) {
  background: #ad2929;
  border-color: #ad2929;
}

.customer-service-connection-overlay {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #fff;
  background: rgba(15, 19, 27, .78);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  transform: translate(-50%, -50%);
}

.customer-service-connection-overlay[hidden] {
  display: none;
}

.customer-service-connection-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: customer-service-waiting-spin .8s linear infinite;
}

.customer-service-header-label {
  display: inline-flex;
  align-items: center;
  min-height: var(--gov-touch-min);
  color: var(--gov-text-muted);
  font-size: var(--gov-fs-14);
  font-weight: 600;
}

.customer-service-entry-main {
  width: min(
    calc(
      100% -
      max(var(--gov-gutter-desktop), env(safe-area-inset-left)) -
      max(var(--gov-gutter-desktop), env(safe-area-inset-right))
    ),
    var(--gov-content-max)
  );
  padding-top: clamp(var(--gov-space-6), 4vw, var(--gov-space-10));
}

.customer-back-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--gov-touch-min);
  margin-bottom: var(--gov-space-4);
  color: var(--gov-brand-700);
  border-radius: var(--gov-radius-4);
  font-size: var(--gov-fs-14);
  font-weight: 600;
  text-decoration: none;
}

.customer-back-link::before {
  margin-right: var(--gov-space-2);
  content: "←";
}

.customer-back-link:hover {
  color: var(--gov-brand-900);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.customer-service-entry {
  min-width: 0;
  padding: clamp(var(--gov-space-6), 3vw, var(--gov-space-8));
  background: var(--gov-surface);
  border: 1px solid var(--gov-border);
  border-radius: var(--gov-radius-8);
  box-shadow: var(--gov-shadow-raised);
}

.customer-service-entry .btn {
  min-height: var(--gov-control-height);
  margin: 0;
  padding: 0 var(--gov-space-4);
  border-radius: var(--gov-radius-4);
  box-shadow: none;
  font-family: var(--gov-font);
  font-size: var(--gov-fs-14);
  font-weight: 600;
  transform: none;
  transition: color var(--gov-motion-fast) ease,
    background-color var(--gov-motion-fast) ease,
    border-color var(--gov-motion-fast) ease,
    box-shadow var(--gov-motion-fast) ease;
}

.customer-service-entry .btn:hover:not(:disabled) {
  box-shadow: none;
  transform: none;
}

.customer-service-heading,
.customer-service-section-heading,
.customer-service-workspace-heading,
.customer-service-panel-heading,
.customer-service-live-meta,
.customer-service-file-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gov-space-4);
}

.customer-service-heading {
  padding-bottom: var(--gov-space-5);
  border-bottom: 1px solid var(--gov-border);
}

.customer-service-heading > div {
  min-width: 0;
}

.customer-service-heading h1 {
  margin: 0;
  color: var(--gov-text-strong);
  font-size: clamp(var(--gov-fs-24), 3vw, var(--gov-fs-32));
  line-height: var(--gov-line-tight);
  letter-spacing: -.02em;
}

.customer-service-heading > div > p:last-child {
  max-width: 48rem;
  margin: var(--gov-space-2) 0 0;
  color: var(--gov-text-muted);
  font-size: var(--gov-fs-14);
  line-height: var(--gov-line-normal);
}

.customer-service-state,
.customer-service-media-status,
.customer-service-channel-status {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 28px;
  padding: var(--gov-space-1) var(--gov-space-3);
  color: var(--gov-brand-800);
  background: var(--gov-brand-50);
  border: 1px solid var(--gov-brand-100);
  border-radius: var(--gov-radius-4);
  font-size: var(--gov-fs-12);
  font-weight: 700;
  line-height: 1.4;
}

.customer-service-entry[data-service-state="connected"] .customer-service-state,
.customer-service-entry[data-service-state="completed"] .customer-service-state,
.customer-service-entry[data-service-state="finished"] .customer-service-state {
  color: var(--gov-success);
  background: var(--gov-success-bg);
  border-color: var(--gov-success-border);
}

.customer-service-entry[data-service-state="error"] .customer-service-state {
  color: var(--gov-error);
  background: var(--gov-error-bg);
  border-color: var(--gov-error-border);
}

.customer-service-feedback {
  margin: var(--gov-space-4) 0;
  padding: var(--gov-space-3) var(--gov-space-4);
  color: var(--gov-text);
  background: var(--gov-surface-subtle);
  border: 1px solid var(--gov-border);
  border-left: 3px solid var(--gov-brand-600);
  border-radius: var(--gov-radius-4);
  font-size: var(--gov-fs-14);
  line-height: var(--gov-line-normal);
}

.customer-service-feedback.is-error {
  color: var(--gov-error);
  background: var(--gov-error-bg);
  border-color: var(--gov-error-border);
  border-left-color: var(--gov-error);
}

.customer-service-feedback.is-success {
  color: var(--gov-success);
  background: var(--gov-success-bg);
  border-color: var(--gov-success-border);
  border-left-color: var(--gov-success);
}

.customer-service-shell {
  display: grid;
  grid-template-areas: "task";
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gov-space-6);
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

.customer-service-task-pane {
  grid-area: task;
  min-width: 0;
  overflow: hidden;
  background: var(--gov-surface);
  border: 1px solid var(--gov-border);
  border-radius: var(--gov-radius-6);
}

.customer-service-context,
.customer-service-preparation,
.customer-service-file-panel {
  min-width: 0;
  padding: var(--gov-space-5);
}

.customer-service-preparation,
.customer-service-file-panel {
  border-top: 1px solid var(--gov-border);
}

.customer-service-section-heading h2,
.customer-service-workspace-heading h2,
.customer-service-panel-heading h3 {
  margin: 0;
  color: var(--gov-text-strong);
  font-size: var(--gov-fs-18);
  line-height: var(--gov-line-tight);
}

.customer-service-section-kicker {
  margin: 0 0 var(--gov-space-1);
  color: var(--gov-brand-700);
  font-size: var(--gov-fs-12);
  font-weight: 700;
  letter-spacing: .1em;
}

.customer-service-descriptions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gov-space-3);
  margin: var(--gov-space-4) 0 0;
}

.customer-service-descriptions > div {
  min-width: 0;
  padding: var(--gov-space-3) var(--gov-space-4);
  background: var(--gov-surface-subtle);
  border: 1px solid var(--gov-border);
  border-radius: var(--gov-radius-4);
}

.customer-service-descriptions dt {
  color: var(--gov-text-muted);
  font-size: var(--gov-fs-12);
}

.customer-service-descriptions dd {
  margin: var(--gov-space-1) 0 0;
  color: var(--gov-text-strong);
  font-size: var(--gov-fs-14);
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.customer-service-matter-picker label {
  display: block;
  margin: var(--gov-space-4) 0 var(--gov-space-2);
  color: var(--gov-text);
  font-size: var(--gov-fs-14);
  font-weight: 600;
}

.customer-service-field-hint {
  margin: var(--gov-space-2) 0 0;
  color: var(--gov-text-muted);
  font-size: var(--gov-fs-12);
  line-height: var(--gov-line-normal);
}

.customer-service-empty {
  display: grid;
  gap: var(--gov-space-1);
  margin-top: var(--gov-space-4);
  padding: var(--gov-space-4);
  color: var(--gov-text-muted);
  background: var(--gov-surface-subtle);
  border: 1px dashed var(--gov-border-strong);
  border-radius: var(--gov-radius-4);
  font-size: var(--gov-fs-14);
  line-height: var(--gov-line-normal);
}

.customer-service-empty strong {
  color: var(--gov-text-strong);
}

.customer-service-matter-details {
  margin-top: var(--gov-space-4);
  border-top: 1px solid var(--gov-border);
  border-bottom: 1px solid var(--gov-border);
}

.customer-service-matter-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gov-space-3);
  min-height: var(--gov-touch-min);
  padding: var(--gov-space-2) 0;
  color: var(--gov-text-strong);
  cursor: pointer;
  font-size: var(--gov-fs-14);
  font-weight: 600;
  list-style: none;
}

.customer-service-matter-details summary::-webkit-details-marker {
  display: none;
}

.customer-service-matter-details summary::after {
  flex: 0 0 auto;
  color: var(--gov-brand-700);
  content: "+";
  font-size: var(--gov-fs-20);
  font-weight: 400;
}

.customer-service-matter-details[open] summary::after {
  content: "−";
}

.customer-service-disclosure-hint {
  margin-left: auto;
  color: var(--gov-text-muted);
  font-size: var(--gov-fs-12);
  font-weight: 400;
}

.customer-service-matter-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gov-space-4);
  padding: 0 0 var(--gov-space-4);
}

.customer-service-matter-content article {
  min-width: 0;
}

.customer-service-matter-content article + article {
  padding-left: var(--gov-space-4);
  border-left: 1px solid var(--gov-border);
}

.customer-service-matter-content h3 {
  margin: 0;
  color: var(--gov-text-strong);
  font-size: var(--gov-fs-14);
}

.customer-service-matter-content p {
  margin: var(--gov-space-2) 0 0;
  color: var(--gov-text-muted);
  font-size: var(--gov-fs-14);
  line-height: var(--gov-line-normal);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.customer-service-actions {
  display: flex;
  align-items: center;
  gap: var(--gov-space-3);
  margin-top: var(--gov-space-5);
}

.customer-service-start {
  min-width: 152px;
  color: #fff;
  background: var(--gov-brand-700);
  border: 1px solid var(--gov-brand-700);
}

.customer-service-start:hover:not(:disabled) {
  color: #fff;
  background: var(--gov-brand-800);
  border-color: var(--gov-brand-800);
}

.customer-service-entry .customer-service-start:disabled {
  color: #fff;
  background: var(--gov-text-placeholder);
  border-color: var(--gov-text-placeholder);
  cursor: not-allowed;
  opacity: 1;
}

.customer-service-cancel {
  color: var(--gov-text);
  background: var(--gov-surface);
  border: 1px solid var(--gov-border-strong);
}

.customer-service-cancel:hover:not(:disabled) {
  color: var(--gov-brand-800);
  border-color: var(--gov-brand-600);
}

.customer-service-file-panel {
  display: none;
}

.customer-service-entry[data-service-state="connected"] .customer-service-file-panel {
  display: block;
}

.customer-service-file-note,
.customer-service-file-status {
  margin: var(--gov-space-3) 0;
  color: var(--gov-text-muted);
  font-size: var(--gov-fs-12);
  line-height: var(--gov-line-normal);
}

.customer-service-file-actions {
  justify-content: flex-start;
}

.customer-service-file-actions .btn {
  color: var(--gov-brand-800);
  background: var(--gov-surface);
  border: 1px solid var(--gov-brand-600);
}

.customer-service-file-actions .btn-primary {
  color: #fff;
  background: var(--gov-brand-700);
  border-color: var(--gov-brand-700);
}

.customer-service-file-actions .btn:disabled {
  color: var(--gov-text-muted);
  background: var(--gov-surface-subtle);
  border-color: var(--gov-border);
  opacity: 1;
}

.customer-service-progress {
  display: grid;
  gap: var(--gov-space-3);
  margin-top: var(--gov-space-4);
}

.customer-service-progress label {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 36px;
  gap: var(--gov-space-2);
  align-items: center;
  color: var(--gov-text-muted);
  font-size: var(--gov-fs-12);
}

.customer-service-progress progress {
  width: 100%;
  height: 8px;
  accent-color: var(--gov-brand-700);
}

.received-files {
  display: grid;
  gap: var(--gov-space-2);
  margin-top: var(--gov-space-4);
}

.received-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gov-space-3);
  min-width: 0;
  padding: var(--gov-space-2) var(--gov-space-3);
  color: var(--gov-text);
  background: var(--gov-surface-subtle);
  border: 1px solid var(--gov-border);
  border-radius: var(--gov-radius-4);
  font-size: var(--gov-fs-12);
}

.download-file {
  flex: 0 0 auto;
  color: var(--gov-brand-700);
  font-weight: 600;
  text-decoration: none;
}

.customer-service-workspace {
  grid-area: workspace;
  min-width: 0;
}

.customer-service-workspace-heading {
  align-items: flex-end;
  margin-bottom: var(--gov-space-4);
}

.customer-service-workspace-heading h2 {
  font-size: var(--gov-fs-20);
}

.customer-service-live-meta {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--gov-text-muted);
  font-size: var(--gov-fs-12);
}

.customer-service-duration {
  white-space: nowrap;
}

.customer-service-duration strong {
  margin-left: var(--gov-space-1);
  color: var(--gov-text-strong);
  font-variant-numeric: tabular-nums;
}

.customer-service-media-canvas {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--gov-media);
  border: 1px solid var(--gov-media-subtle);
  border-radius: var(--gov-radius-6);
}

.customer-service-video-panel,
.customer-service-screen-panel,
.customer-service-video-stage,
.customer-service-screen-stage {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
}

.customer-service-video-panel {
  z-index: 1;
  overflow: hidden;
  background: var(--gov-media);
}

.customer-service-video-stage {
  overflow: hidden;
}

.customer-service-video-stage .remote-video-box {
  position: absolute;
  inset: 0;
  display: grid;
  width: 100%;
  min-height: 0;
  aspect-ratio: auto;
  overflow: hidden;
  background: var(--gov-media);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  place-items: center;
}

.customer-service-media-canvas video {
  border: 0 !important;
}

.customer-service-video-stage .remote-video-box > video,
.customer-service-video-stage .local-video-box > video {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gov-media);
}

.customer-service-video-stage .remote-video-box > video {
  object-fit: cover;
  object-position: center 35%;
}

.customer-service-video-stage .local-video-box {
  position: absolute;
  z-index: 4;
  right: clamp(var(--gov-space-3), 2vw, var(--gov-space-5));
  bottom: clamp(var(--gov-space-3), 2vw, var(--gov-space-5));
  width: clamp(144px, 20%, 216px);
  min-height: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--gov-media-subtle);
  border: 1px solid rgba(255, 255, 255, .56);
  border-radius: var(--gov-radius-6);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .24);
}

.customer-service-video-stage .local-video-box > video {
  object-fit: cover;
  object-position: center 32%;
}

.customer-service-video-stage .local-video-box:not(.has-video) > video {
  opacity: 0;
}

.customer-service-video-stage .local-video-box.cam-off .video-placeholder-text {
  font-size: 0;
}

.customer-service-video-stage .local-video-box.cam-off .video-placeholder-text::after {
  content: "摄像头已关闭";
  font-size: var(--gov-fs-12);
}

.customer-service-video-label {
  position: absolute;
  z-index: 6;
  top: var(--gov-space-3);
  left: var(--gov-space-3);
  padding: var(--gov-space-1) var(--gov-space-2);
  color: var(--gov-media-text);
  background: rgba(16, 24, 40, .78);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--gov-radius-2);
  font-size: var(--gov-fs-12);
  line-height: 1.4;
}

.customer-service-video-stage .local-video-box .customer-service-video-label {
  top: var(--gov-space-2);
  left: var(--gov-space-2);
}

.customer-service-media-canvas .video-placeholder-text,
.customer-service-media-canvas .screen-placeholder {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(80%, 28rem);
  margin: 0;
  color: var(--gov-media-text);
  text-align: center;
  font-size: var(--gov-fs-14);
  line-height: var(--gov-line-normal);
  transform: translate(-50%, -50%);
}

.customer-service-video-stage .local-video-box .video-placeholder-text {
  width: calc(100% - 2 * var(--gov-space-3));
  font-size: var(--gov-fs-12);
}

.remote-video-box.has-video .video-placeholder-text,
.local-video-box.has-video .video-placeholder-text,
.customer-service-screen-panel.has-video .screen-placeholder {
  display: none;
}

.customer-service-restore {
  position: absolute;
  z-index: 8;
  inset: auto auto var(--gov-space-5) 50%;
  color: #fff;
  background: var(--gov-brand-700);
  border: 1px solid rgba(255, 255, 255, .48);
  transform: translateX(-50%);
}

.customer-service-screen-panel {
  z-index: 2;
  display: none;
  overflow: hidden;
  background: var(--gov-media);
}

.customer-service-screen-panel.active,
body.screen-sharing .customer-service-screen-panel {
  display: block;
}

.customer-service-screen-stage {
  display: grid;
  overflow: hidden;
  background: var(--gov-media);
  place-items: center;
}

.customer-service-screen-stage video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gov-media);
  object-fit: contain;
}

.customer-service-screen-stage #localScreenVideo {
  z-index: 2;
}

.customer-service-screen-heading {
  position: absolute;
  z-index: 5;
  top: var(--gov-space-3);
  left: var(--gov-space-3);
  padding: var(--gov-space-2) var(--gov-space-3);
  color: var(--gov-media-text);
  background: rgba(16, 24, 40, .82);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--gov-radius-4);
}

.customer-service-screen-heading h3,
.customer-service-screen-heading p {
  margin: 0;
  color: inherit;
  font-size: var(--gov-fs-12);
  line-height: 1.4;
}

.customer-service-screen-heading h3 {
  font-weight: 700;
}

body.screen-sharing .customer-service-video-panel {
  z-index: 3;
  pointer-events: none;
  background: transparent;
}

body.screen-sharing .customer-service-video-stage,
body.screen-sharing .customer-service-video-stage .remote-video-box {
  background: transparent;
}

body.screen-sharing .customer-service-video-stage .remote-stage {
  visibility: hidden;
}

body.screen-sharing .customer-service-video-stage .local-video-box {
  visibility: visible;
}

.customer-service-media-controls {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--gov-space-2);
  margin-top: var(--gov-space-4);
  padding: var(--gov-space-3);
  background: var(--gov-surface-subtle);
  border: 1px solid var(--gov-border);
  border-radius: var(--gov-radius-6);
}

.customer-service-media-controls .customer-service-control {
  min-width: 108px;
  color: var(--gov-text);
  background: var(--gov-surface);
  border: 1px solid var(--gov-border-strong);
}

.customer-service-media-controls .customer-service-control:hover:not(:disabled) {
  color: var(--gov-brand-800);
  background: var(--gov-brand-50);
  border-color: var(--gov-brand-600);
}

.customer-service-media-controls .customer-service-control-primary,
.customer-service-media-controls .customer-service-control.on {
  color: #fff;
  background: var(--gov-brand-700);
  border-color: var(--gov-brand-700);
}

.customer-service-media-controls .customer-service-control-service {
  color: var(--gov-brand-800);
  border-color: var(--gov-brand-600);
}

.customer-service-media-controls .customer-service-end {
  color: var(--gov-error);
  background: var(--gov-surface);
  border-color: var(--gov-error-border);
}

.customer-service-media-controls .customer-service-end:hover:not(:disabled) {
  color: var(--gov-error);
  background: var(--gov-error-bg);
  border-color: var(--gov-error);
}

.customer-service-media-controls .btn:disabled {
  color: var(--gov-text-muted);
  background: var(--gov-surface-subtle);
  border-color: var(--gov-border);
  cursor: not-allowed;
  opacity: 1;
}

.customer-service-entry[data-service-state="connected"] .customer-service-shell {
  max-width: none;
}

.customer-service-entry[data-service-state="connected"] .customer-service-matter-picker,
.customer-service-entry[data-service-state="connected"] .customer-service-preparation > .customer-service-section-heading,
.customer-service-entry[data-service-state="connected"] .customer-service-actions {
  display: none;
}

.customer-service-evaluation .customer-service-modal-card {
  width: min(100%, 560px);
  text-align: left;
}

.customer-service-evaluation h2 {
  margin: 0;
  color: var(--gov-text-strong);
  font-size: var(--gov-fs-20);
}

.customer-service-evaluation .customer-service-modal-card > p {
  margin: var(--gov-space-2) 0 var(--gov-space-4);
  color: var(--gov-text-muted);
  font-size: var(--gov-fs-14);
  line-height: var(--gov-line-normal);
}

.customer-service-rating {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gov-space-2);
  margin-bottom: var(--gov-space-4);
}

.service-rating-star {
  width: var(--gov-touch-min);
  height: var(--gov-touch-min);
  color: var(--gov-text-placeholder);
  background: var(--gov-surface);
  border: 1px solid var(--gov-border-strong);
  border-radius: var(--gov-radius-4);
  cursor: pointer;
  font-size: var(--gov-fs-24);
}

.service-rating-star.is-selected {
  color: var(--gov-warning);
  background: var(--gov-warning-bg);
  border-color: var(--gov-warning-border);
}

.customer-service-evaluation label {
  display: block;
  color: var(--gov-text);
  font-size: var(--gov-fs-14);
  font-weight: 600;
}

.customer-service-evaluation textarea {
  width: 100%;
  min-height: 104px;
  margin: var(--gov-space-2) 0 var(--gov-space-3);
  padding: var(--gov-space-3);
  color: var(--gov-text-strong);
  background: var(--gov-surface);
  border: 1px solid var(--gov-border-strong);
  border-radius: var(--gov-radius-4);
  resize: vertical;
  font: inherit;
}

.customer-service-evaluation textarea:focus {
  outline: none;
  border-color: var(--gov-brand-600);
  box-shadow: var(--gov-focus-ring);
}

@media (min-width: 1025px) {
  .customer-service-entry[data-service-state="connected"] .customer-service-shell {
    grid-template-areas: "workspace task";
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    align-items: start;
  }

  .customer-service-entry[data-service-state="connected"] .customer-service-task-pane {
    position: sticky;
    top: var(--gov-space-6);
    max-height: calc(100dvh - 2 * var(--gov-space-8));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .customer-service-entry[data-service-state="connected"] .customer-service-descriptions {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-service-entry[data-service-state="connected"] .customer-service-descriptions > div {
    padding: var(--gov-space-2) 0;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .customer-service-entry[data-service-state="connected"] .customer-service-descriptions > div + div {
    border-top: 1px solid var(--gov-border);
  }

  .customer-service-entry[data-service-state="connected"] .customer-service-matter-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-service-entry[data-service-state="connected"] .customer-service-matter-content article + article {
    padding-top: var(--gov-space-4);
    padding-left: 0;
    border-top: 1px solid var(--gov-border);
    border-left: 0;
  }
}

/* 手机与窄平板只复用真实媒体与控制入口；桌面工作区从 1025px 起继续使用上方专属规则。 */
@media (max-width: 1024px) {
  html,
  body[data-customer-realtime-mode="service-entry"] {
    min-height: 100%;
    height: 100%;
    overflow: hidden;
    background: #f2f5f9;
  }

  body[data-customer-realtime-mode="service-entry"] .customer-entry-header,
  body[data-customer-realtime-mode="service-entry"] .customer-back-link,
  .customer-service-heading,
  .customer-service-desktop-status-feedback,
  .customer-service-task-pane,
  .customer-service-workspace-heading,
  .customer-service-media-source-rail {
    display: none !important;
  }

  .customer-service-entry-main {
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
    padding: 0;
  }

  .customer-service-entry {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    background: #f2f5f9;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .customer-service-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 56px;
    padding: max(8px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left));
    background: #fff;
    border-bottom: 1px solid #e4e9f0;
  }

  .customer-service-navigation-brand,
  .customer-service-navigation-links,
  .customer-service-navigation-context {
    display: none;
  }

  .customer-service-mobile-context {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .customer-service-mobile-status {
    color: #172033;
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 700;
    line-height: 1.25;
  }

  .customer-service-mobile-meta {
    overflow: hidden;
    color: #5c667a;
    font-size: 12px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .customer-service-entry .customer-service-primary-action {
    min-width: 76px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 13px;
    white-space: nowrap;
  }

  .customer-service-shell,
  .customer-service-entry[data-service-state="connected"] .customer-service-shell {
    display: block;
    min-height: 0;
    height: 100%;
    padding: 0;
  }

  .customer-service-workspace {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: clamp(8px, 2vw, 14px);
  }

  .customer-service-media-layout {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
  }

  .customer-service-media-canvas {
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 0;
    aspect-ratio: auto;
    border: 1px solid #292e36;
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(17, 19, 24, .18);
  }

  .customer-service-entry:not([data-service-state="connected"]) .customer-service-video-stage .local-video-box > video {
    object-fit: cover;
  }

  .customer-service-screen-heading {
    top: 10px;
    left: 10px;
    padding: 6px 8px;
  }

  .customer-service-screen-heading h3 {
    display: none;
  }

  .customer-service-media-controls {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    flex: 0 0 auto;
    gap: clamp(2px, 1vw, 8px);
    margin: 10px 0 0;
    padding: 8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: #fff;
    border: 1px solid #e4e9f0;
    border-radius: 14px;
    box-shadow: 0 -2px 12px rgba(23, 32, 51, .06);
  }

  .customer-service-media-controls .customer-service-control {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 54px;
    padding: 3px 0 0;
    color: #5c667a;
    background: transparent;
    border: 0;
    border-radius: 10px;
    font-size: 0;
    place-items: center;
  }

  .customer-service-media-controls .customer-service-control::before {
    width: 24px;
    height: 24px;
    background: center / 22px 22px no-repeat;
    content: "";
  }

  .customer-service-media-controls .customer-service-control::after {
    color: currentColor;
    font-size: 11px;
    line-height: 1;
  }

  #toggleMicBtn::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c667a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='2' width='6' height='12' rx='3'/%3E%3Cpath d='M5 10a7 7 0 0 0 14 0M12 19v3'/%3E%3C/svg%3E"); }
  #toggleMicBtn::after { content: "麦克风"; }
  #toggleCamBtn::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c667a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='13' height='12' rx='2'/%3E%3Cpath d='m16 13 5 3V8l-5 3'/%3E%3C/svg%3E"); }
  #toggleCamBtn::after { content: "摄像头"; }
  #screenBtn::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c667a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4M9 9l3-3 3 3M12 6v7'/%3E%3C/svg%3E"); }
  #screenBtn::after { content: "共享"; }
  #customerServiceMaterialButton::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c667a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='5' cy='12' r='1' fill='%235c667a'/%3E%3Ccircle cx='12' cy='12' r='1' fill='%235c667a'/%3E%3Ccircle cx='19' cy='12' r='1' fill='%235c667a'/%3E%3C/svg%3E"); }
  #customerServiceMaterialButton::after { content: "更多"; }
  #customerServiceEndButton::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d94848' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.7 13.3a15 15 0 0 1 2.6 0l1.2 2.4a2 2 0 0 0 2.3 1l3.3-1a2 2 0 0 0 1.4-2.2l-.4-2.4C17 7.6 7 7.6 2.9 11.1l-.4 2.4a2 2 0 0 0 1.4 2.2l3.3 1a2 2 0 0 0 2.3-1z'/%3E%3C/svg%3E"); }
  #customerServiceEndButton::after { content: "结束"; }
  #customerServiceEndButton { color: #d94848; }

  .customer-service-media-controls .customer-service-control.on::before { filter: sepia(1) saturate(7) hue-rotate(183deg); }
  .customer-service-media-controls .customer-service-control:disabled { color: #a7afbd; background: transparent; opacity: .55; }

  .customer-service-mobile-more-panel {
    position: absolute;
    z-index: 20;
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: max(14px, env(safe-area-inset-left));
    display: grid;
    padding: 8px;
    background: #fff;
    border: 1px solid #e4e9f0;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(23, 32, 51, .18);
  }

  .customer-service-mobile-more-panel[hidden] { display: none; }

  .customer-service-mobile-more-action {
    min-height: 48px;
    padding: 0 14px;
    color: #172033;
    background: #f8fafc;
    border: 1px solid #e4e9f0;
    border-radius: 9px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
  }

  @media (orientation: landscape) and (max-height: 560px) {
    .customer-service-navigation { min-height: 48px; padding-top: 6px; padding-bottom: 6px; }
    .customer-service-media-controls { margin-top: 6px; padding-top: 4px; padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
    .customer-service-media-controls .customer-service-control { min-height: 46px; }
  }
}

/* 手机服务工作区第一轮最终覆盖 */
@media (max-width: 767px) {
  html, body[data-customer-realtime-mode="service-entry"], body[data-customer-realtime-mode="service-entry"] #customerServiceMain { width: 100%; height: 100dvh; min-height: 100svh; overflow: hidden; }
  body[data-customer-realtime-mode="service-entry"] { background: #f2f5f9; }
  .customer-service-entry-main, .customer-service-entry { width: 100%; height: 100dvh; min-height: 100svh; margin: 0; padding: 0; }
  .customer-service-entry { display: grid; grid-template-rows: clamp(84px, 11dvh, 100px) minmax(0, 1fr) clamp(96px, 12dvh, 112px); overflow: hidden; background: #f2f5f9; }
  .customer-service-navigation { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; min-height: 0; height: 100%; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)); background: #fff; border-bottom: 1px solid #e4e9f0; box-shadow: 0 1px 5px rgba(23, 32, 51, .05); }
  .customer-service-mobile-cancel-waiting { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 10px; color: #d94848; background: #fff; border: 1px solid #efc3c3; border-radius: 10px; font-size: 13px; white-space: nowrap; }
  .customer-service-mobile-cancel-waiting[hidden] { display: none; }
  .customer-service-mobile-context { min-width: 0; }
  .customer-service-mobile-status { color: #172033; font-size: 15px; line-height: 20px; }
  .customer-service-mobile-meta { font-size: 12px; line-height: 18px; }
  .customer-service-mobile-home { display: inline-flex; align-items: center; min-height: 44px; color: #2864dc; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
  .customer-service-entry .customer-service-start { min-width: 76px; min-height: 44px; margin: 0; padding: 0 10px; border-radius: 10px; font-size: 13px; }
  .customer-service-shell, .customer-service-entry[data-service-state="connected"] .customer-service-shell, .customer-service-workspace { display: contents !important; }
  .customer-service-media-layout { grid-row: 2; display: block; min-width: 0; min-height: 0; padding: clamp(8px, 3vw, 16px); overflow: hidden; }
  .customer-service-media-canvas { width: 100%; height: 100%; min-height: 0; max-height: none; aspect-ratio: auto; overflow: hidden; background: #111318; border: 1px solid #292e36; border-radius: clamp(12px, 3vw, 16px); box-shadow: 0 8px 20px rgba(17, 19, 24, .18); }
  .customer-service-video-stage .remote-stage video, .customer-service-video-stage .local-video-box video, .customer-service-screen-stage #remoteScreenVideo, .customer-service-screen-stage #localScreenVideo { width: 100%; height: 100%; object-fit: contain; object-position: center; }
  .customer-service-media-controls { grid-row: 3; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; min-height: 0; height: 100%; margin: 0 clamp(8px, 3vw, 12px) max(8px, env(safe-area-inset-bottom)); padding: 6px max(4px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left)); background: #fff; border: 1px solid #e4e9f0; border-radius: clamp(16px, 5vw, 20px); box-shadow: 0 4px 14px rgba(23, 32, 51, .08); }
  .customer-service-media-controls .customer-service-control { display: grid; grid-template-rows: 48px 16px; place-content: start center; gap: 3px; min-width: 0; min-height: 48px; padding: 0; }
  .customer-service-media-controls .customer-service-control::before { width: 48px; height: 48px; background-size: 23px 23px; }
  .customer-service-media-controls .customer-service-control::after { color: #5c667a; font-size: 11px; line-height: 16px; }
  .customer-service-mobile-more-panel { position: fixed; z-index: 80; right: 12px; bottom: calc(clamp(96px, 12dvh, 112px) + 14px + env(safe-area-inset-bottom)); left: 12px; }
  .customer-service-modal { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .38); }
  .customer-service-modal[hidden] { display: none; }
  .customer-service-modal-card { width: min(92vw, 520px); max-height: 72dvh; padding: 22px; overflow: auto; background: #fff; border: 0; border-radius: 18px; box-shadow: 0 18px 44px rgba(15, 23, 42, .24); }
  .customer-service-waiting-panel .customer-service-modal-card { width: min(92vw, 480px); min-height: 260px; }
  .customer-service-waiting-panel h3 { font-size: 20px; }
  .customer-service-waiting-actions .btn { width: 100%; min-height: 44px; }
  .customer-service-evaluation .customer-service-modal-card { width: min(520px, calc(100vw - 40px)); max-height: 72dvh; padding: 24px; }
  .customer-service-evaluation-heading { margin: 18px 0 10px; color: #172033; font-size: 15px; }
  .customer-service-evaluation .customer-service-file-actions { flex-direction: row; }
  .customer-service-result-next { margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid #e4e9f0; color: #172033; font-size: 15px; }
  .customer-service-evaluation .customer-service-modal-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  #customerServiceReturnHomeButton { color: #5c667a; background: transparent; border-color: transparent; }
  .customer-service-reject-result { align-items: end; padding: 0; }
  .customer-service-reject-result .customer-service-modal-card { width: 100%; max-height: min(62dvh, 480px); margin: 0; padding: 20px max(16px, env(safe-area-inset-right)) max(20px, calc(20px + env(safe-area-inset-bottom))) max(16px, env(safe-area-inset-left)); overflow-y: auto; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 36px rgba(15, 23, 42, .2); }
  .customer-service-reject-result .customer-service-modal-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
  .customer-service-reject-result .customer-service-modal-actions .btn { width: 100%; min-height: 48px; }
  .customer-service-entry[data-service-state="ended"] .customer-service-media-layout,
  .customer-service-entry[data-service-state="ended"] .customer-service-media-controls { opacity: .54; filter: saturate(.68); pointer-events: none; }
  @media (orientation: landscape) { .customer-service-entry { grid-template-rows: 64px minmax(0, 1fr) 84px; } .customer-service-navigation { padding-top: 6px; padding-bottom: 6px; } .customer-service-media-controls { margin-bottom: 4px; } .customer-service-media-controls .customer-service-control { grid-template-rows: 42px 14px; } .customer-service-media-controls .customer-service-control::before { width: 42px; height: 42px; background-size: 22px 22px; } }
}

/* 群众手机 / 平板核心弹窗：统一居中浮层语言，不改变既有业务状态与 handler。 */
body[data-customer-realtime-mode="service-entry"] {
  --customer-mobile-modal-width: clamp(280px, 84vw, 360px);
  --customer-mobile-modal-max-height: min(72dvh, 560px);
  --customer-mobile-modal-radius: 20px;
  --customer-mobile-modal-border: rgba(197, 207, 222, .82);
  --customer-mobile-modal-shadow: 0 24px 64px rgba(15, 23, 42, .18), 0 8px 20px rgba(15, 23, 42, .1), inset 0 1px rgba(255, 255, 255, .88);
  --customer-mobile-modal-ease: cubic-bezier(.2, .8, .2, 1);
}

@keyframes customer-service-modal-backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes customer-service-modal-enter {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes customer-service-modal-exit {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(6px) scale(.985); }
}

@media (max-width: 1024px) {
  .customer-service-modal {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 100%;
    height: 100dvh;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    overflow: hidden;
    background: rgba(15, 23, 42, .28);
    animation: customer-service-modal-backdrop-enter 180ms ease-out both;
    overscroll-behavior: contain;
  }

  .customer-service-modal[hidden] { display: none; }

  .customer-service-modal:not(.customer-service-file-modal) > .customer-service-modal-card {
    display: flex;
    flex-direction: column;
    width: var(--customer-mobile-modal-width);
    max-width: calc(100vw - 32px);
    max-height: var(--customer-mobile-modal-max-height);
    min-height: 0;
    margin: 0;
    padding: 20px 20px 18px;
    overflow: hidden;
    color: #172033;
    background: #fff;
    border: 1px solid var(--customer-mobile-modal-border);
    border-radius: var(--customer-mobile-modal-radius);
    box-shadow: var(--customer-mobile-modal-shadow);
    text-align: center;
    transform-origin: center;
    animation: customer-service-modal-enter 190ms var(--customer-mobile-modal-ease) both;
  }

  .customer-service-modal.is-closing:not(.customer-service-file-modal) > .customer-service-modal-card {
    animation: customer-service-modal-exit 150ms ease-in both;
  }

  .customer-service-modal-header {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    align-items: center;
    flex: 0 0 auto;
    min-height: 44px;
    margin-bottom: 12px;
  }

  .customer-service-modal-header h2,
  .customer-service-modal-header h3 {
    min-width: 0;
    margin: 0;
    color: #172033;
    font-size: clamp(16px, 4.2vw, 18px);
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -.01em;
    text-align: center;
  }

  .customer-service-modal-header .customer-service-modal-symbol,
  .customer-service-modal-heading-icon {
    justify-self: start;
  }

  .customer-service-modal-header .customer-service-modal-symbol {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .customer-service-modal-header .customer-service-modal-symbol svg {
    width: 19px;
    height: 19px;
  }

  .customer-service-modal-header-spacer {
    width: 72px;
    height: 1px;
  }

  .customer-service-modal-tools {
    position: static;
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-width: 36px;
  }

  .customer-service-modal-icon-button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    color: #5c667a;
    background: #f7f9fc;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 0;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 120ms ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .customer-service-modal-icon-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
  }

  .customer-service-modal-icon-button:hover,
  .customer-service-modal-icon-button:focus-visible {
    color: #172033;
    background: #eef3fa;
    border-color: #dfe6ef;
  }

  .customer-service-modal-icon-button:active { transform: scale(.94); }

  .customer-service-modal-body {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .customer-service-modal-body > p {
    margin: 0;
    color: #5c667a;
    font-size: 14px;
    line-height: 1.65;
  }

  .customer-service-modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    flex: 0 0 auto;
    gap: 10px;
    width: 100%;
    margin-top: 16px;
  }

  .customer-service-modal-actions .btn,
  .customer-service-waiting-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    touch-action: manipulation;
  }

  .customer-service-modal-actions .btn:active,
  .customer-service-waiting-actions .btn:active { transform: scale(.985); }

  .customer-service-waiting-panel {
    align-items: center;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }

  .customer-service-waiting-panel .customer-service-modal-card {
    width: var(--customer-mobile-modal-width);
    min-height: 0;
  }

  .customer-service-waiting-spinner.customer-service-modal-heading-icon {
    box-sizing: border-box;
    width: 34px;
    height: 34px;
    background: #f2f6ff;
    border: 2px solid #d5e2fa;
    border-top-color: #2864dc;
    border-radius: 50%;
  }

  .customer-service-waiting-duration {
    margin-top: 12px;
    padding: 12px 14px;
    color: #5c667a;
    background: #f6f8fb;
    border: 1px solid #edf0f5;
    border-radius: 14px;
    font-size: 13px;
  }

  .customer-service-waiting-duration strong {
    display: block;
    margin-top: 2px;
    color: #2864dc;
    font-size: 26px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .03em;
  }

  .customer-service-waiting-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    flex: 0 0 auto;
    margin-top: 16px;
  }

  .customer-service-waiting-chip {
    position: fixed;
    z-index: 90;
    top: max(14px, calc(env(safe-area-inset-top) + 10px));
    right: max(14px, env(safe-area-inset-right));
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    max-width: calc(100vw - 28px);
    padding: 0 13px;
    color: #2864dc;
    background: #fff;
    border: 1px solid #d5e1f6;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .14), 0 2px 8px rgba(15, 23, 42, .08);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    animation: customer-service-modal-enter 180ms var(--customer-mobile-modal-ease) both;
  }

  .customer-service-waiting-chip[hidden] { display: none; }

  .customer-service-reject-result {
    align-items: center;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }

  .customer-service-reject-result .customer-service-modal-card {
    width: var(--customer-mobile-modal-width);
    max-height: var(--customer-mobile-modal-max-height);
    padding: 20px 20px 18px;
    border-radius: var(--customer-mobile-modal-radius);
    text-align: center;
  }

  .customer-service-reject-reason {
    margin: 0;
    padding: 12px 14px;
    background: #f6f8fb;
    border: 1px solid #e9edf3;
    border-radius: 14px;
    text-align: left;
  }

  .customer-service-reject-reason h3 { margin: 0 0 4px; font-size: 13px; }
  .customer-service-reject-reason p { font-size: 14px; line-height: 1.6; }

  .customer-service-evaluation .customer-service-modal-card {
    width: var(--customer-mobile-modal-width) !important;
    max-width: calc(100vw - 32px);
    max-height: var(--customer-mobile-modal-max-height) !important;
    padding: 20px 20px 18px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 1px solid var(--customer-mobile-modal-border);
    border-radius: var(--customer-mobile-modal-radius);
  }

  .customer-service-confirm-end {
    color: #fff;
    background: #d94848;
    border-color: #d94848;
  }
}

@media (max-width: 359px) {
  .customer-service-modal-header {
    grid-template-columns: 68px minmax(0, 1fr) 68px;
  }

  .customer-service-modal:not(.customer-service-file-modal) > .customer-service-modal-card {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-service-modal,
  .customer-service-modal-card,
  .customer-service-waiting-chip {
    animation: none !important;
    transition: none !important;
  }
}

/* 手机服务结果：最终覆盖历史弹窗规则，保证完整显示并与服务控制保持同一视觉语言。 */
@media (max-width: 767px) {
  .customer-service-waiting-panel {
    align-items: end;
    padding: 0;
  }

  .customer-service-waiting-panel .customer-service-modal-card {
    width: 100%;
    min-height: 0;
    max-height: min(62dvh, 420px);
    margin: 0;
    padding: 20px max(16px, env(safe-area-inset-right)) max(20px, calc(20px + env(safe-area-inset-bottom))) max(16px, env(safe-area-inset-left));
    border-radius: 20px 20px 0 0;
    text-align: left;
  }

  .customer-service-waiting-panel .customer-service-modal-tools,
  .customer-service-waiting-chip {
    display: none;
  }

  .customer-service-waiting-panel h3 {
    margin-top: 0;
  }

  .customer-service-waiting-actions .btn {
    min-height: 48px;
  }

  .customer-service-evaluation {
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  }

  .customer-service-evaluation .customer-service-modal-card {
    display: flex;
    flex-direction: column;
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: clamp(18px, 4vw, 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 20px;
    text-align: center;
    scrollbar-width: thin;
  }

  .customer-service-evaluation .customer-service-section-kicker,
  .customer-service-evaluation-heading,
  .customer-service-evaluation .customer-service-result-next {
    display: none;
  }

  .customer-service-evaluation h2 {
    margin: 0;
    color: #172033;
    font-size: clamp(24px, 6.4vw, 32px);
    line-height: 1.25;
  }

  .customer-service-evaluation h2::before {
    display: block;
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    background: #2864dc center / 32px 32px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4.2 4.2L19 6.5'/%3E%3C/svg%3E");
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(40, 100, 220, .25);
    content: "";
  }

  .customer-service-evaluation .customer-service-modal-card > p {
    margin: 8px 0 14px;
    color: #667085;
    font-size: 16px;
    line-height: 1.5;
  }

  .customer-service-rating {
    justify-content: center;
    gap: clamp(8px, 3vw, 18px);
    margin: 0 0 14px;
  }

  .service-rating-star {
    width: 42px;
    height: 42px;
    padding: 0;
    color: #98a2b3;
    background: transparent;
    border: 0;
    font-size: 40px;
    line-height: 1;
  }

  .service-rating-star.is-selected { color: #d89b23; background: transparent; border-color: transparent; }

  .customer-service-evaluation label { display: none; }

  .customer-service-evaluation textarea {
    min-height: clamp(78px, 14dvh, 124px);
    margin: 0 0 10px;
    padding: 14px;
    border-color: #d0d5dd;
    border-radius: 12px;
    resize: none;
    font-size: 16px;
    line-height: 1.45;
  }

  .customer-service-evaluation .customer-service-file-actions {
    gap: 8px;
    margin: 0 0 10px;
  }

  .customer-service-evaluation .customer-service-file-actions .btn { min-height: 40px; font-size: 14px; }

  .customer-service-evaluation .customer-service-modal-actions {
    gap: 8px;
    margin-top: 0;
  }

  .customer-service-evaluation .customer-service-modal-actions .btn { width: 100%; min-height: 48px; font-size: 18px; }
  #customerServiceContinueButton { color: #fff; background: #2864dc; border-color: #2864dc; }
  #customerServiceReturnOrganizationButton { color: #2864dc; background: #fff; border-color: #2864dc; }
  #customerServiceReturnHomeButton { min-height: 40px; color: #2864dc; }

  .customer-service-media-controls .customer-service-control::before { background-color: transparent; border-radius: 0; background-size: 28px 28px; }
  #customerServiceEndButton::before { background-color: transparent; }
  #screenBtn::after { content: "共享屏幕"; }
  #customerServiceMaterialButton::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23283244' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='5' cy='12' r='1' fill='%23283244'/%3E%3Ccircle cx='12' cy='12' r='1' fill='%23283244'/%3E%3Ccircle cx='19' cy='12' r='1' fill='%23283244'/%3E%3C/svg%3E"); }
  #customerServiceMaterialButton::after { content: "更多"; }
}

/* 此处的 !important 仅用于压过本文件遗留的同一手机选择器。 */
@media (max-width: 767px) {
  .customer-service-evaluation .customer-service-modal-card { width: min(520px, calc(100vw - 32px)) !important; max-height: calc(100dvh - 32px) !important; padding: clamp(18px, 4vw, 24px) !important; overflow-y: auto !important; }
  .customer-service-evaluation h2::before { display: block !important; }
  .customer-service-evaluation .customer-service-section-kicker,
  .customer-service-evaluation-heading,
  .customer-service-evaluation .customer-service-result-next { display: none !important; }
  .customer-service-evaluation .customer-service-modal-actions { margin-top: 0 !important; }
  .customer-service-media-controls .customer-service-control::before { background-color: transparent !important; border-radius: 0 !important; background-size: 28px 28px !important; }
  #customerServiceEndButton::before { background-color: transparent !important; }
  #screenBtn::after { content: "共享屏幕" !important; }
  #customerServiceMaterialButton::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23283244' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='5' cy='12' r='1' fill='%23283244'/%3E%3Ccircle cx='12' cy='12' r='1' fill='%23283244'/%3E%3Ccircle cx='19' cy='12' r='1' fill='%23283244'/%3E%3C/svg%3E") !important; }
}

/* 手机共享态媒体舞台：只重排既有视频节点，不改变实时媒体链路。 */
@media (max-width: 767px) {
  body.screen-sharing .customer-service-mobile-status::after {
    content: " · 共享屏幕";
  }

  body.screen-sharing .customer-service-screen-panel {
    z-index: 2;
    display: block;
  }

  body.screen-sharing .customer-service-screen-stage,
  body.screen-sharing .customer-service-screen-stage #remoteScreenVideo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  body.screen-sharing .customer-service-screen-heading {
    display: none;
  }

  .customer-service-screen-fullscreen {
    position: absolute;
    z-index: 7;
    top: 12px;
    right: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #fff;
    background: rgba(17, 19, 24, .68);
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
  }

  body.screen-sharing .customer-service-screen-fullscreen:not([hidden]) {
    display: inline-flex;
  }

  .customer-service-screen-fullscreen svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
  }

  .customer-service-screen-fullscreen:focus-visible {
    outline: 3px solid rgba(111, 156, 242, .82);
    outline-offset: 2px;
  }

  body.screen-sharing .customer-service-video-panel {
    z-index: 4;
  }

  body.screen-sharing .customer-service-media-floating-group .remote-stage > video,
  body.screen-sharing .customer-service-media-floating-group .local-video-box > video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .customer-service-media-canvas:fullscreen,
  .customer-service-media-canvas:-webkit-full-screen {
    width: 100%;
    height: 100%;
    background: #111318;
    border: 0;
    border-radius: 0;
  }

  .customer-service-media-canvas:fullscreen .customer-service-screen-fullscreen svg,
  .customer-service-media-canvas:-webkit-full-screen .customer-service-screen-fullscreen svg {
    transform: rotate(180deg);
  }
}

/* 手机服务工作区第一轮最终覆盖 */
@media (max-width: 767px) {
  html,
  body[data-customer-realtime-mode="service-entry"],
  body[data-customer-realtime-mode="service-entry"] #customerServiceMain {
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
    overflow: hidden;
  }

  body[data-customer-realtime-mode="service-entry"] {
    background: #f2f5f9;
  }

  .customer-service-entry-main,
  .customer-service-entry {
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
    margin: 0;
    padding: 0;
  }

  .customer-service-entry {
    display: grid;
    grid-template-rows: clamp(84px, 11dvh, 100px) minmax(0, 1fr) clamp(96px, 12dvh, 112px);
    overflow: hidden;
    background: #f2f5f9;
  }

  .customer-service-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    min-height: 0;
    height: 100%;
    padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
    background: #fff;
    border-bottom: 1px solid #e4e9f0;
    box-shadow: 0 1px 5px rgba(23, 32, 51, .05);
  }

  .customer-service-mobile-context { min-width: 0; }
  .customer-service-mobile-status { color: #172033; font-size: 15px; line-height: 20px; }
  .customer-service-mobile-meta { font-size: 12px; line-height: 18px; }

  .customer-service-mobile-home {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #2864dc;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
  }

  .customer-service-entry .customer-service-start {
    min-width: 76px;
    min-height: 44px;
    margin: 0;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 13px;
  }

  .customer-service-shell,
  .customer-service-entry[data-service-state="connected"] .customer-service-shell,
  .customer-service-workspace {
    display: contents !important;
  }

  .customer-service-media-layout {
    grid-row: 2;
    display: block;
    min-width: 0;
    min-height: 0;
    padding: clamp(8px, 3vw, 16px);
    overflow: hidden;
  }

  .customer-service-media-canvas {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    overflow: hidden;
    background: #111318;
    border: 1px solid #292e36;
    border-radius: clamp(12px, 3vw, 16px);
    box-shadow: 0 8px 20px rgba(17, 19, 24, .18);
  }

  .customer-service-video-stage .remote-stage video,
  .customer-service-video-stage .local-video-box video,
  .customer-service-screen-stage #remoteScreenVideo,
  .customer-service-screen-stage #localScreenVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .customer-service-media-controls {
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    min-height: 0;
    height: 100%;
    margin: 0 clamp(8px, 3vw, 12px) max(8px, env(safe-area-inset-bottom));
    padding: 6px max(4px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
    background: #fff;
    border: 1px solid #e4e9f0;
    border-radius: clamp(16px, 5vw, 20px);
    box-shadow: 0 4px 14px rgba(23, 32, 51, .08);
  }

  .customer-service-media-controls .customer-service-control {
    display: grid;
    grid-template-rows: 48px 16px;
    place-content: start center;
    gap: 3px;
    min-width: 0;
    min-height: 48px;
    padding: 0;
  }

  .customer-service-media-controls .customer-service-control::before {
    width: 48px;
    height: 48px;
    background-size: 23px 23px;
  }

  .customer-service-media-controls .customer-service-control::after {
    color: #5c667a;
    font-size: 11px;
    line-height: 16px;
  }

  .customer-service-mobile-more-panel {
    position: fixed;
    z-index: 80;
    right: 12px;
    bottom: calc(clamp(96px, 12dvh, 112px) + 14px + env(safe-area-inset-bottom));
    left: 12px;
  }

  .customer-service-modal {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(15, 23, 42, .38);
  }

  .customer-service-modal[hidden] { display: none; }

  .customer-service-modal-card {
    width: min(92vw, 520px);
    max-height: 72dvh;
    padding: 22px;
    overflow: auto;
    background: #fff;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .24);
  }

  .customer-service-waiting-panel .customer-service-modal-card { width: min(92vw, 480px); min-height: 260px; }
  .customer-service-waiting-panel h3 { font-size: 20px; }
  .customer-service-waiting-actions .btn { width: 100%; min-height: 44px; }
  .customer-service-evaluation .customer-service-modal-card { padding: 22px; }
  .customer-service-evaluation .customer-service-file-actions { flex-direction: row; }
  .customer-service-result-next { margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid #e4e9f0; color: #172033; font-size: 15px; }
  .customer-service-evaluation .customer-service-modal-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  #customerServiceReturnHomeButton { color: #5c667a; background: transparent; border-color: transparent; }

  @media (orientation: landscape) {
    .customer-service-entry { grid-template-rows: 64px minmax(0, 1fr) 84px; }
    .customer-service-navigation { padding-top: 6px; padding-bottom: 6px; }
    .customer-service-media-controls { margin-bottom: 4px; }
    .customer-service-media-controls .customer-service-control { grid-template-rows: 42px 14px; }
    .customer-service-media-controls .customer-service-control::before { width: 42px; height: 42px; background-size: 22px 22px; }
  }
}

/* 手机第一轮：保持既有媒体流与状态机，只重新排列服务页的可见工作区。 */
@media (max-width: 1024px) {
  html,
  body[data-customer-realtime-mode="service-entry"] {
    height: 100%;
    overflow: hidden;
  }

  body[data-customer-realtime-mode="service-entry"] {
    background: #f2f5f9;
  }

  body[data-customer-realtime-mode="service-entry"] .customer-entry-header,
  body[data-customer-realtime-mode="service-entry"] .customer-back-link,
  .customer-service-heading,
  .customer-service-desktop-status-feedback,
  .customer-service-task-pane,
  .customer-service-workspace-heading {
    display: none;
  }

  .customer-service-entry-main,
  .customer-service-entry {
    min-height: 100dvh;
  }

  .customer-service-entry {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    background: #f2f5f9;
  }

  .customer-service-navigation {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 64px;
    padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
    background: #fff;
    border-bottom: 1px solid #e4e9f0;
    box-shadow: 0 2px 8px rgba(23, 32, 51, .05);
  }

  .customer-service-navigation-brand,
  .customer-service-navigation-links,
  .customer-service-navigation-context {
    display: none;
  }

  .customer-service-mobile-context {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .customer-service-mobile-status {
    color: #172033;
    font-size: 14px;
    font-weight: 700;
  }

  .customer-service-mobile-meta {
    display: block;
    overflow: hidden;
    color: #5c667a;
    font-size: 12px;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .customer-service-start {
    min-width: 104px;
    min-height: 44px;
    margin-left: 12px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 14px;
    white-space: nowrap;
  }

  .customer-service-shell,
  .customer-service-entry[data-service-state="connected"] .customer-service-shell {
    display: block;
    min-height: 0;
    height: 100%;
    padding: 0;
    overflow: hidden;
    background: transparent;
  }

  .customer-service-workspace {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    height: 100%;
    padding: 12px 12px calc(10px + env(safe-area-inset-bottom));
    overflow: hidden;
    background: #f2f5f9;
  }

  .customer-service-media-layout,
  .customer-service-media-canvas,
  .customer-service-video-panel,
  .customer-service-video-stage {
    min-height: 0;
    height: 100%;
  }

  .customer-service-media-layout {
    display: block;
  }

  .customer-service-media-canvas {
    position: relative;
    overflow: hidden;
    background: #111318;
    border: 1px solid #292e36;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(17, 19, 24, .18);
  }
  .customer-service-video-panel,
  .customer-service-video-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #111318;
  }

  .customer-service-video-stage .remote-stage video,
  .customer-service-video-stage .local-video-box video {
    display: block;
    width: 100%;
    height: 100%;
    background: #111318;
    object-fit: cover;
  }

  .customer-service-screen-panel {
    position: absolute;
    z-index: 10;
    inset: 0;
    display: none;
    overflow: hidden;
    margin: 0;
    background: #111318;
    border: 0;
    border-radius: 0;
  }

  .customer-service-screen-panel.active,
  body.screen-sharing .customer-service-screen-panel {
    display: block;
  }

  .customer-service-screen-heading,
  .screen-placeholder {
    display: none;
  }

  .customer-service-screen-stage,
  .customer-service-screen-stage #remoteScreenVideo,
  .customer-service-screen-stage #localScreenVideo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #111318;
  }

  .customer-service-screen-stage #remoteScreenVideo,
  .customer-service-screen-stage #localScreenVideo {
    object-fit: contain;
  }

  .customer-service-media-controls {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    min-height: 78px;
    margin: 10px 0 0;
    padding: 5px 4px;
    background: #fff;
    border: 1px solid #e4e9f0;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(23, 32, 51, .06);
  }

  .customer-service-media-controls .customer-service-control {
    display: grid;
    grid-template-rows: 48px 16px;
    place-content: start center;
    gap: 2px;
    min-width: 0;
    min-height: 68px;
    padding: 0;
    font-size: 0;
  }

  .customer-service-media-controls .customer-service-control::before {
    width: 48px;
    height: 48px;
  }

  .customer-service-media-controls .customer-service-control::after {
    position: static;
    height: auto;
    color: #5c667a;
    font-size: 11px;
    line-height: 16px;
  }

  .customer-service-mobile-more-panel {
    position: fixed;
    z-index: 30;
    right: 12px;
    bottom: calc(96px + env(safe-area-inset-bottom));
    left: auto;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .customer-service-media-canvas {
    aspect-ratio: 4 / 3;
  }

  .customer-service-entry[data-service-state="connected"] .customer-service-shell {
    grid-template-areas:
      "workspace"
      "task";
  }

  .customer-service-entry[data-service-state="connected"] .customer-service-task-pane {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .customer-service-entry[data-service-state="connected"] .customer-service-preparation {
    border-top: 0;
    border-left: 1px solid var(--gov-border);
  }

  .customer-service-entry[data-service-state="connected"] .customer-service-file-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .customer-service-header-label {
    font-size: var(--gov-fs-12);
  }

  .customer-service-entry-main {
    width: min(
      calc(
        100% -
        max(var(--gov-gutter-mobile), env(safe-area-inset-left)) -
        max(var(--gov-gutter-mobile), env(safe-area-inset-right))
      ),
      var(--gov-content-max)
    );
    padding-top: var(--gov-space-4);
  }

  .customer-back-link {
    margin-bottom: var(--gov-space-2);
  }

  .customer-service-entry {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

}

@media (min-width: 1025px) {

  .customer-service-navigation {
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) minmax(180px, auto) auto;
    align-items: center;
    gap: clamp(20px, 2.5vw, 42px);
    min-height: 62px;
    padding: 0 18px 0 20px;
    color: #fff;
    background: #163e78;
  }

  .customer-service-navigation-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    text-decoration: none;
  }

  .customer-service-navigation-logo {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .customer-service-navigation-brand svg,
  .customer-service-navigation-logo .platform-brand-logo-image {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .customer-service-navigation-links {
    align-self: stretch;
    display: flex;
    align-items: stretch;
    gap: 4px;
  }

  .customer-service-navigation-links a,
  .customer-service-navigation-links span {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    color: rgba(255, 255, 255, .72);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 140ms ease, background-color 140ms ease;
  }

  .customer-service-navigation-links a:hover,
  .customer-service-navigation-links a:focus-visible {
    color: rgba(255, 255, 255, .94);
    background: rgba(255, 255, 255, .08);
  }

  .customer-service-navigation-links [aria-current="page"] {
    color: #fff;
    background: rgba(255, 255, 255, .1);
  }

  .customer-service-navigation-links [aria-current="page"]::after {
    position: absolute;
    right: 14px;
    bottom: 0;
    left: 14px;
    height: 2px;
    background: #fff;
    border-radius: 2px 2px 0 0;
    content: "";
  }

  .customer-service-navigation-context {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
  }

  .customer-service-navigation-context svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .customer-service-navigation-context span {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .customer-service-entry .customer-service-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    min-height: 40px;
    padding: 0 18px;
    color: #163e78;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 9px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .customer-service-entry .customer-service-primary-action:hover:not(:disabled) {
    color: #123565;
    background: #f4f8ff;
  }

  .customer-service-entry .customer-service-primary-action.is-loading {
    color: rgba(255, 255, 255, .86);
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .2);
  }

  .customer-service-entry .customer-service-primary-action.is-danger {
    color: #fff;
    background: #c83232;
    border-color: #c83232;
  }

  .customer-service-entry .customer-service-primary-action[hidden] {
    display: none;
  }

  .customer-service-heading,
  .customer-service-desktop-status-feedback {
    display: none !important;
  }

}

@media (max-width: 767px) {

  .customer-service-heading {
    align-items: flex-start;
    gap: var(--gov-space-3);
    padding: var(--gov-space-5);
    background: var(--gov-surface);
    border: 1px solid var(--gov-border);
    border-radius: var(--gov-radius-6);
  }

  .customer-service-heading h1 {
    font-size: clamp(var(--gov-fs-24), 7vw, 1.75rem);
  }

  .customer-service-state {
    align-self: flex-start;
  }

  .customer-service-feedback {
    margin: var(--gov-space-3) 0;
  }

  .customer-service-shell {
    grid-template-areas: "task";
  }

  .customer-service-entry[data-service-state="connected"] .customer-service-shell {
    grid-template-areas:
      "workspace"
      "task";
    gap: var(--gov-space-3);
  }

  .customer-service-task-pane {
    border-radius: var(--gov-radius-6);
  }

  .customer-service-context,
  .customer-service-preparation,
  .customer-service-file-panel {
    padding: var(--gov-space-4);
  }

  .customer-service-section-heading,
  .customer-service-workspace-heading,
  .customer-service-panel-heading,
  .customer-service-live-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--gov-space-2);
  }

  .customer-service-descriptions,
  .customer-service-matter-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-service-descriptions > div {
    padding: var(--gov-space-2) var(--gov-space-3);
  }

  .customer-service-matter-content article + article {
    padding-top: var(--gov-space-4);
    padding-left: 0;
    border-top: 1px solid var(--gov-border);
    border-left: 0;
  }

  .customer-service-actions,
  .customer-service-file-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-service-actions .btn,
  .customer-service-file-actions .btn {
    width: 100%;
  }

  .customer-service-workspace-heading {
    margin: 0 0 var(--gov-space-3);
    padding: var(--gov-space-3) var(--gov-space-4);
    background: var(--gov-surface);
    border: 1px solid var(--gov-border);
    border-radius: var(--gov-radius-6);
  }

  .customer-service-live-meta {
    width: 100%;
  }

  .customer-service-media-canvas {
    max-height: min(68svh, 720px);
    aspect-ratio: 3 / 4;
    border-radius: var(--gov-radius-6);
  }

  .customer-service-media-controls {
    position: sticky;
    z-index: 30;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gov-space-2);
    margin-top: var(--gov-space-2);
    padding: var(--gov-space-2) max(var(--gov-space-2), env(safe-area-inset-right)) calc(var(--gov-space-2) + env(safe-area-inset-bottom)) max(var(--gov-space-2), env(safe-area-inset-left));
    background: var(--gov-surface);
    border-color: var(--gov-border);
    box-shadow: 0 -4px 12px rgba(24, 34, 48, .08);
  }

  .customer-service-media-controls .customer-service-control {
    min-width: 0;
    min-height: 48px;
    padding: 0 var(--gov-space-1);
    font-size: var(--gov-fs-12);
    line-height: 1.3;
  }

  .customer-service-evaluation .customer-service-modal-card {
    padding: var(--gov-space-5) var(--gov-space-4);
  }
}

@media (max-width: 479px) {
  .customer-service-heading {
    flex-direction: column;
    padding: var(--gov-space-4);
  }

  .customer-service-heading > div > p:last-child {
    font-size: var(--gov-fs-12);
  }

  .customer-service-disclosure-hint {
    display: none;
  }

  .customer-service-progress label {
    grid-template-columns: 56px minmax(0, 1fr) 32px;
  }

  .customer-service-media-controls {
    gap: var(--gov-space-1);
  }
}

@media (max-width: 767px) and (orientation: landscape) {
  .customer-service-media-canvas {
    max-height: calc(100svh - 168px);
    aspect-ratio: 16 / 9;
  }

  .customer-service-media-controls {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .customer-service-entry-main {
    padding-top: var(--gov-space-10);
  }

  .customer-service-entry[data-service-state="connected"] .customer-service-media-canvas {
    max-height: min(680px, calc(100dvh - 240px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-service-entry *,
  .customer-service-entry *::before,
  .customer-service-entry *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (forced-colors: active) {
  .customer-service-media-canvas,
  .customer-service-video-stage .local-video-box,
  .customer-service-state {
    border: 1px solid CanvasText;
  }
}

/* 当前服务的文件状态由 GovFileTransfer 单一状态源镜像到右侧摘要与业务弹窗。 */
.customer-service-file-summary,
.customer-service-file-task,
.customer-service-file-panel-transfers {
  display: grid;
  gap: 10px;
}

.customer-service-entry .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.customer-service-file-summary[hidden],
.customer-service-file-task[hidden],
.customer-service-file-panel-transfers[hidden],
.customer-service-file-modal[hidden],
.customer-service-file-floating-button[hidden] {
  display: none;
}

.customer-service-file-summary-row,
.customer-service-file-task-meta,
.customer-service-file-progress-line,
.customer-service-file-section-heading,
.customer-service-file-modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-service-file-summary-row.is-file span:first-child,
.customer-service-file-task-meta span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-service-file-summary progress,
.customer-service-file-progress-line progress {
  width: 100%;
  height: 7px;
  accent-color: #2864dc;
}

.customer-service-file-empty {
  color: #8a94a6;
  font-size: 12px;
  line-height: 1.6;
}

@media (min-width: 1025px) {
  html,
  body[data-customer-realtime-mode="service-entry"] {
    height: 100%;
    overflow: hidden;
  }

  body[data-customer-realtime-mode="service-entry"] {
    background: #f2f5f9;
  }

  .customer-service-entry-main {
    height: 100dvh;
    box-sizing: border-box;
  }

  .customer-service-entry {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    height: calc(100dvh - 32px);
    overflow: hidden;
    background: transparent;
    border-color: rgba(228, 233, 240, .92);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 8px 24px rgba(20, 30, 50, .07);
  }

  .customer-service-shell,
  .customer-service-entry[data-service-state="connected"] .customer-service-shell {
    grid-template-columns: minmax(0, 1fr) clamp(286px, 23vw, 340px);
    gap: 12px;
    min-height: 0;
    padding: 12px;
    overflow: hidden;
    background: #f2f5f9;
  }

  .customer-service-workspace,
  .customer-service-task-pane,
  .customer-service-entry[data-service-state="connected"] .customer-service-task-pane {
    height: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(228, 233, 240, .92);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 8px 24px rgba(20, 30, 50, .07);
  }

  .customer-service-workspace {
    border-right: 1px solid rgba(228, 233, 240, .92);
  }

  .customer-service-task-pane,
  .customer-service-entry[data-service-state="connected"] .customer-service-task-pane {
    max-height: none;
    overflow: hidden;
  }

  .customer-service-context,
  .customer-service-preparation,
  .customer-service-file-panel {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .customer-service-file-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .customer-service-file-summary {
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 10px;
  }

  .customer-service-file-summary-row {
    color: #5c667a;
    font-size: 12px;
  }

  .customer-service-file-summary-row strong {
    color: #2864dc;
    font-weight: 600;
  }

  .customer-service-media-layout {
    flex: 1 1 auto;
    overflow: hidden;
  }

  .customer-service-media-source-rail {
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 8px 24px rgba(20, 30, 50, .07);
  }

  .customer-service-media-canvas {
    max-height: 100%;
    border: 1px solid #292e36;
    box-shadow: 0 12px 30px rgba(17, 19, 24, .22);
  }

  .customer-service-video-stage .local-video-box,
  body.screen-sharing .customer-service-video-stage .local-video-box {
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  }

  .customer-service-media-controls {
    flex: 0 0 78px;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 6px 18px rgba(20, 30, 50, .06);
  }

  .customer-service-file-modal {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(10, 20, 36, .48);
  }

  .customer-service-file-workspace {
    width: min(760px, calc(100vw - 64px));
    max-height: calc(100dvh - 64px);
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(228, 233, 240, .96);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(16, 24, 40, .18);
    text-align: left;
  }

  .customer-service-file-modal-heading,
  .customer-service-file-compose,
  .customer-service-file-transfer-section {
    padding: 18px 22px;
  }

  .customer-service-file-modal-heading {
    border-bottom: 1px solid #e8edf3;
  }

  .customer-service-file-modal-heading h2,
  .customer-service-file-section-heading h3 {
    margin: 0;
    color: #172033;
  }

  .customer-service-file-modal-heading h2 {
    font-size: 20px;
  }

  .customer-service-file-section-heading h3 {
    font-size: 14px;
  }

  .customer-service-file-section-heading > span,
  .customer-service-file-section-heading > strong {
    color: #7b8598;
    font-size: 12px;
    font-weight: 500;
  }

  .customer-service-file-compose {
    border-bottom: 1px solid #e8edf3;
  }

  .customer-service-file-compose .customer-service-file-actions {
    margin-top: 14px;
  }

  .customer-service-file-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(340px, calc(100dvh - 310px));
    overflow: hidden;
  }

  .customer-service-file-transfer-section {
    min-width: 0;
    overflow-y: auto;
  }

  .customer-service-file-transfer-section + .customer-service-file-transfer-section {
    border-left: 1px solid #e8edf3;
  }

  .customer-service-file-task,
  .customer-service-file-transfer-section > .customer-service-file-empty {
    margin-top: 16px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 10px;
  }

  .customer-service-file-task-meta {
    color: #283244;
    font-size: 13px;
  }

  .customer-service-file-progress-line > span {
    min-width: 38px;
    color: #2864dc;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
  }

  .customer-service-file-floating-button {
    position: fixed;
    z-index: 80;
    right: 24px;
    bottom: 24px;
    min-height: 40px;
    padding: 0 16px;
    color: #2864dc;
    background: #fff;
    border: 1px solid #c9d9fa;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, .14);
    cursor: pointer;
  }
}

/* 群众远程协办桌面工作区。新增结构默认不参与平板与手机布局。 */
.customer-service-media-source-rail,
.customer-service-waiting-panel,
.customer-service-waiting-chip,
.customer-service-desktop-duration {
  display: none;
}

.customer-service-mobile-home {
  display: none;
}

@media (min-width: 1025px) {
  body[data-customer-realtime-mode="service-entry"] {
    min-width: 1024px;
    color: #172033;
    background: #f5f7fa;
  }

  body[data-customer-realtime-mode="service-entry"] .customer-entry-header,
  body[data-customer-realtime-mode="service-entry"] .customer-back-link {
    display: none;
  }

  .customer-service-entry-main {
    width: min(100% - 32px, 1680px);
    padding: 16px 0;
  }

  .customer-service-entry {
    position: relative;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e4e9f0;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(23, 32, 51, .08);
  }

  .customer-service-heading {
    min-height: 66px;
    padding: 12px 188px 12px 20px;
    background: #fff;
    border-bottom: 1px solid #edf0f4;
  }

  .customer-service-heading > div {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .customer-service-heading .customer-entry-kicker {
    width: 100%;
    margin: 0;
    color: #5c667a;
    font-size: 11px;
    letter-spacing: .06em;
  }

  .customer-service-heading h1 {
    font-size: 18px;
    line-height: 1.3;
  }

  .customer-service-heading-context {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #5c667a;
    font-size: 13px;
  }

  .customer-service-heading > div > p:last-child {
    max-width: none;
  }

  .customer-service-state {
    position: absolute;
    top: 21px;
    right: 174px;
    min-height: 26px;
    padding: 4px 10px;
    color: #2864dc;
    background: #eef4ff;
    border: 0;
    border-radius: 8px;
    font-size: 12px;
  }

  .customer-service-feedback {
    min-height: 34px;
    margin: 0;
    padding: 8px 20px;
    color: #5c667a;
    background: #f8fafc;
    border: 0;
    border-bottom: 1px solid #edf0f4;
    border-radius: 0;
    font-size: 12px;
  }

  .customer-service-shell,
  .customer-service-entry[data-service-state="connected"] .customer-service-shell {
    grid-template-areas: "workspace task";
    grid-template-columns: minmax(0, 1fr) clamp(286px, 23vw, 340px);
    gap: 0;
    align-items: start;
    max-width: none;
    margin: 0;
  }

  .customer-service-workspace {
    grid-area: workspace;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 14px 16px 10px;
    background: #f8fafc;
    border-right: 1px solid #e4e9f0;
  }

  .customer-service-workspace-heading {
    min-height: 28px;
    margin: 0 0 10px;
  }

  .customer-service-workspace-heading > div:first-child {
    display: none;
  }

  .customer-service-live-meta {
    width: 100%;
    justify-content: space-between;
    color: #5c667a;
  }

  .customer-service-duration {
    display: none;
  }

  .customer-service-media-layout {
    display: grid;
    grid-template-columns: clamp(124px, 12vw, 154px) minmax(0, 1fr);
    flex: 0 0 auto;
    gap: 12px;
    min-height: 0;
  }

  .customer-service-media-source-rail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 10px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e4e9f0;
    border-radius: 12px;
  }

  .customer-service-media-source-heading {
    color: #5c667a;
    font-size: 12px;
    font-weight: 600;
  }

  .customer-service-media-source {
    position: relative;
    display: block;
    width: 100%;
    min-height: 82px;
    padding: 0;
    overflow: hidden;
    color: #fff;
    background: #181b21;
    border: 1px solid #292e36;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 140ms ease, transform 120ms ease;
  }

  .customer-service-media-source[hidden] {
    display: none;
  }

  .customer-service-media-source:hover {
    border-color: #6f9cf2;
  }

  .customer-service-media-source:active {
    transform: scale(.96);
  }

  .customer-service-media-source:focus-visible {
    outline: 3px solid rgba(40, 100, 220, .28);
    outline-offset: 2px;
  }

  .customer-service-media-source video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111318;
    object-fit: cover;
  }

  .customer-service-media-source[data-media-source$="screen"] video {
    object-fit: contain;
  }

  .customer-service-media-source span {
    position: absolute;
    right: 6px;
    bottom: 6px;
    left: 6px;
    padding: 3px 6px;
    overflow: hidden;
    background: rgba(17, 19, 24, .8);
    border-radius: 6px;
    font-size: 11px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .customer-service-media-source-empty {
    margin: auto 0;
    color: #8a94a6;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
  }

  .customer-service-media-source-empty[hidden] {
    display: none;
  }

  .customer-service-media-canvas {
    align-self: center;
    width: 100%;
    max-height: calc(100dvh - 246px);
    aspect-ratio: 16 / 9;
    background: #111318;
    border: 1px solid #292e36;
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(17, 19, 24, .18);
  }

  .customer-service-video-panel,
  .customer-service-video-stage,
  .customer-service-video-stage .remote-video-box,
  .customer-service-screen-panel,
  .customer-service-screen-stage {
    background: #111318;
  }

  .customer-service-entry[data-main-media-source="remote-camera"] .customer-service-screen-panel {
    display: none !important;
  }

  .customer-service-entry[data-main-media-source="remote-camera"] .customer-service-video-panel {
    z-index: 3;
    background: #111318;
  }

  .customer-service-entry[data-main-media-source="remote-camera"] .customer-service-video-stage .remote-stage {
    visibility: visible;
  }

  .customer-service-entry[data-main-media-source="remote-screen"] .customer-service-screen-panel,
  .customer-service-entry[data-main-media-source="local-screen"] .customer-service-screen-panel {
    z-index: 2;
    display: block !important;
  }

  .customer-service-entry[data-main-media-source="remote-screen"] .customer-service-video-panel,
  .customer-service-entry[data-main-media-source="local-screen"] .customer-service-video-panel {
    z-index: 3;
    pointer-events: none;
    background: transparent;
  }

  .customer-service-entry[data-main-media-source="remote-screen"] .remote-stage,
  .customer-service-entry[data-main-media-source="local-screen"] .remote-stage {
    visibility: hidden;
  }

  .customer-service-entry[data-main-media-source="remote-screen"] #remoteScreenVideo,
  .customer-service-entry[data-main-media-source="local-screen"] #localScreenVideo {
    display: block !important;
    object-fit: contain;
  }

  .customer-service-entry[data-main-media-source="remote-screen"] #localScreenVideo,
  .customer-service-entry[data-main-media-source="local-screen"] #remoteScreenVideo {
    display: none !important;
  }

  .customer-service-video-stage .local-video-box,
  body.screen-sharing .customer-service-video-stage .local-video-box {
    top: auto;
    right: 16px;
    bottom: 16px;
    width: clamp(148px, 20%, 220px);
    visibility: visible;
    border: 1px solid rgba(255, 255, 255, .36);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  }

  .customer-service-task-pane,
  .customer-service-entry[data-service-state="connected"] .customer-service-task-pane {
    position: static;
    top: auto;
    display: block;
    max-height: calc(100dvh - 116px);
    overflow-y: auto;
    background: #fff;
    border: 0;
    border-radius: 0;
    overscroll-behavior: contain;
  }

  .customer-service-context,
  .customer-service-preparation,
  .customer-service-file-panel {
    padding: 18px 20px;
  }

  .customer-service-preparation,
  .customer-service-file-panel {
    border-top: 1px solid #edf0f4;
  }

  .customer-service-descriptions,
  .customer-service-entry[data-service-state="connected"] .customer-service-descriptions {
    display: block;
    margin-top: 12px;
  }

  .customer-service-descriptions > div,
  .customer-service-entry[data-service-state="connected"] .customer-service-descriptions > div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .customer-service-descriptions > div + div,
  .customer-service-entry[data-service-state="connected"] .customer-service-descriptions > div + div {
    border-top: 1px solid #edf0f4;
  }

  .customer-service-descriptions dt,
  .customer-service-descriptions dd {
    margin: 0;
    line-height: 1.5;
  }

  .customer-service-desktop-duration {
    display: grid;
  }

  .customer-service-file-panel,
  .customer-service-entry[data-service-state="connected"] .customer-service-file-panel {
    display: block;
  }

  .customer-service-file-actions .btn {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 8px;
  }

  .customer-service-actions {
    position: absolute;
    z-index: 20;
    top: 13px;
    right: 16px;
    margin: 0;
  }

  .customer-service-entry .customer-service-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    box-sizing: border-box;
    padding: 0 19px;
    color: #fff;
    background: #2864dc;
    border-color: #2864dc;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 140ms ease, transform 120ms ease;
  }

  .customer-service-start::before {
    width: 18px;
    height: 18px;
    background: center / 18px 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
    content: "";
  }

  .customer-service-start:hover:not(:disabled) {
    background: #2157c5;
    border-color: #2157c5;
  }

  .customer-service-start:active:not(:disabled) {
    background: #1948aa;
    transform: scale(.96);
  }

  .customer-service-entry .customer-service-start::after,
  .customer-service-entry .customer-service-waiting-actions .btn::after {
    background: none;
  }

  .customer-service-media-controls {
    min-height: 78px;
    margin: 10px 0 0;
    padding: 4px 12px;
    background: #fff;
    border: 1px solid #e4e9f0;
    border-radius: 12px;
  }

  .customer-service-media-controls .customer-service-control {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 70px;
    min-width: 70px;
    min-height: 67px;
    padding: 0;
    color: #283244;
    background: transparent;
    border: 0;
    border-radius: 10px;
    font-size: 0;
    transition: transform 120ms ease;
  }

  .customer-service-media-controls .customer-service-control::before {
    width: 48px;
    height: 48px;
    background-color: #f1f3f6;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 21px 21px;
    border-radius: 14px;
    content: "";
    transition: background-color 140ms ease;
  }

  .customer-service-media-controls .customer-service-control::after {
    position: absolute;
    inset: auto 0 0;
    height: 16px;
    color: #5c667a;
    background: none;
    opacity: 1;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
  }

  .customer-service-media-controls .customer-service-control:hover:not(:disabled),
  .customer-service-media-controls .customer-service-control-primary,
  .customer-service-media-controls .customer-service-control.on,
  .customer-service-media-controls .customer-service-control-service,
  .customer-service-media-controls .customer-service-end {
    color: inherit;
    background: transparent;
    border: 0;
  }

  .customer-service-media-controls .customer-service-control:hover:not(:disabled)::before {
    background-color: #e8ebf0;
  }

  .customer-service-media-controls .customer-service-control:active:not(:disabled) {
    transform: scale(.96);
  }

  #startCamBtn::before,
  #toggleCamBtn.on::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23283244' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 13 5 3V8l-5 3'/%3E%3Crect x='3' y='6' width='13' height='12' rx='2'/%3E%3C/svg%3E");
  }

  #startCamBtn::after,
  #toggleCamBtn::after {
    content: "摄像头";
  }

  #toggleCamBtn:not(.on)::before {
    background-color: #fdeeee;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d94848' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 13 5 3V8l-5 3M3 3l18 18M10.6 6H5a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11V11.4'/%3E%3C/svg%3E");
  }

  #toggleMicBtn.on::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23283244' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='2' width='6' height='12' rx='3'/%3E%3Cpath d='M5 10a7 7 0 0 0 14 0M12 19v3'/%3E%3C/svg%3E");
  }

  #toggleMicBtn:not(.on)::before {
    background-color: #fdeeee;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d94848' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 9v1a3 3 0 0 0 5.1 2.1M15 9V5a3 3 0 0 0-5.8-1M5 10a7 7 0 0 0 11.9 5M19 10a7 7 0 0 1-.4 2.3M12 19v3M3 3l18 18'/%3E%3C/svg%3E");
  }

  #toggleMicBtn::after {
    content: "麦克风";
  }

  #screenBtn::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23283244' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4M9 9l3-3 3 3M12 6v7'/%3E%3C/svg%3E");
  }

  #screenBtn.on::before {
    background-color: #eaf2ff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232864dc' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4M9 9l3-3 3 3M12 6v7'/%3E%3C/svg%3E");
  }

  #screenBtn::after {
    content: "共享";
  }

  #customerServiceMaterialButton::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23283244' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M8 13h8M8 17h6'/%3E%3C/svg%3E");
  }

  #customerServiceMaterialButton::after {
    content: "文件";
  }

  #customerServiceEndButton::before {
    background-color: #fdeeee;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d94848' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.7 13.3a15 15 0 0 1 2.6 0l1.2 2.4a2 2 0 0 0 2.3 1l3.3-1a2 2 0 0 0 1.4-2.2l-.4-2.4C17 7.6 7 7.6 2.9 11.1l-.4 2.4a2 2 0 0 0 1.4 2.2l3.3 1a2 2 0 0 0 2.3-1z'/%3E%3C/svg%3E");
  }

  #customerServiceEndButton::after {
    color: #d94848;
    content: "结束服务";
  }

  .customer-service-entry:not([data-service-state="connected"]) #customerServiceEndButton {
    display: flex;
  }

  .customer-service-media-controls .btn:disabled {
    background: transparent;
    opacity: .52;
  }

  .customer-service-waiting-panel {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    width: auto;
    padding: 20px;
    background: rgba(10, 20, 36, .48);
    transform: none;
  }

  .customer-service-waiting-panel[hidden] {
    display: none;
  }

  .customer-service-waiting-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #d9e4f8;
    border-top-color: #2864dc;
    border-radius: 50%;
    animation: customer-service-waiting-spin .8s linear infinite;
  }

  .customer-service-waiting-panel h3 {
    margin: 14px 0 4px;
    color: #172033;
    font-size: 16px;
  }

  .customer-service-waiting-duration {
    margin-top: 18px;
    color: #5c667a;
    font-size: 13px;
  }

  .customer-service-waiting-duration strong {
    display: block;
    margin-top: 4px;
    color: #2864dc;
    font-size: 30px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .03em;
  }

  .customer-service-waiting-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
  }

  .customer-service-waiting-actions .btn {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 10px;
  }

  .customer-service-waiting-chip {
    position: fixed;
    z-index: 60;
    top: 78px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 13px;
    color: #2864dc;
    background: #fff;
    border: 1px solid #c9d9fa;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(23, 32, 51, .14);
    cursor: pointer;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
  }

  .customer-service-waiting-chip:hover {
    border-color: #8fb0ef;
    box-shadow: 0 9px 24px rgba(23, 32, 51, .18);
  }

  .customer-service-waiting-chip:active {
    transform: scale(.98);
  }

  .customer-service-waiting-chip[hidden] {
    display: none;
  }

  .customer-service-waiting-dot {
    width: 7px;
    height: 7px;
    background: #2864dc;
    border-radius: 50%;
  }

  @keyframes customer-service-waiting-spin {
    to { transform: rotate(360deg); }
  }
}

/* 桌面主容器最终层级覆盖：保留原有结构，仅增加 Surface / Border / Elevation。 */
@media (min-width: 1025px) {
  html,
  body[data-customer-realtime-mode="service-entry"] {
    height: 100%;
    overflow: hidden;
  }

  body[data-customer-realtime-mode="service-entry"] {
    background: #f2f5f9;
  }

  .customer-service-entry-main {
    height: 100dvh;
    box-sizing: border-box;
  }

  .customer-service-entry {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    height: calc(100dvh - 32px);
    overflow: hidden;
    background: transparent;
    border: 1px solid rgba(228, 233, 240, .92);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 8px 24px rgba(20, 30, 50, .07);
  }

  .customer-service-shell,
  .customer-service-entry[data-service-state="connected"] .customer-service-shell {
    grid-template-columns: minmax(0, 1fr) clamp(286px, 23vw, 340px);
    gap: 12px;
    min-height: 0;
    padding: 12px;
    overflow: hidden;
    background: #f2f5f9;
  }

  .customer-service-workspace,
  .customer-service-task-pane,
  .customer-service-entry[data-service-state="connected"] .customer-service-task-pane {
    height: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(228, 233, 240, .92);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 8px 24px rgba(20, 30, 50, .07);
  }

  .customer-service-workspace {
    border-right: 1px solid rgba(228, 233, 240, .92);
  }

  .customer-service-task-pane,
  .customer-service-entry[data-service-state="connected"] .customer-service-task-pane {
    max-height: none;
    overflow: hidden;
  }

  .customer-service-context,
  .customer-service-preparation,
  .customer-service-file-panel {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .customer-service-file-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .customer-service-media-layout {
    flex: 1 1 auto;
    overflow: hidden;
  }

  .customer-service-media-canvas {
    max-height: 100%;
    box-shadow: 0 12px 30px rgba(17, 19, 24, .22);
  }

  .customer-service-video-stage .local-video-box,
  body.screen-sharing .customer-service-video-stage .local-video-box {
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  }

  .customer-service-media-controls {
    flex: 0 0 78px;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 6px 18px rgba(20, 30, 50, .06);
  }
}

/* 移动弹窗最终层级使用更具体的服务页选择器，防止下方历史工作区规则回写。 */
@media (max-width: 1024px) {
  body[data-customer-realtime-mode="service-entry"] .customer-service-waiting-panel .customer-service-modal-tools { display: flex; }

  body[data-customer-realtime-mode="service-entry"] .customer-service-modal {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100dvh;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    overflow: hidden;
    background: rgba(15, 23, 42, .28);
  }

  body[data-customer-realtime-mode="service-entry"] .customer-service-modal[hidden] { display: none; }

  body[data-customer-realtime-mode="service-entry"] .customer-service-modal:not(.customer-service-file-modal) > .customer-service-modal-card,
  body[data-customer-realtime-mode="service-entry"] .customer-service-waiting-panel > .customer-service-modal-card,
  body[data-customer-realtime-mode="service-entry"] .customer-service-reject-result > .customer-service-modal-card,
  body[data-customer-realtime-mode="service-entry"] .customer-service-evaluation > .customer-service-modal-card {
    width: var(--customer-mobile-modal-width) !important;
    max-width: calc(100vw - 32px) !important;
    max-height: var(--customer-mobile-modal-max-height) !important;
    min-height: 0;
    margin: 0;
    padding: 20px 20px 18px !important;
    background: #fff;
    border: 1px solid var(--customer-mobile-modal-border);
    border-radius: var(--customer-mobile-modal-radius) !important;
    box-shadow: var(--customer-mobile-modal-shadow);
    text-align: center;
  }

  body[data-customer-realtime-mode="service-entry"] .customer-service-waiting-panel,
  body[data-customer-realtime-mode="service-entry"] .customer-service-reject-result,
  body[data-customer-realtime-mode="service-entry"] .customer-service-evaluation {
    align-items: center;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }

  body[data-customer-realtime-mode="service-entry"] .customer-service-modal-actions,
  body[data-customer-realtime-mode="service-entry"] .customer-service-reject-result .customer-service-modal-actions,
  body[data-customer-realtime-mode="service-entry"] .customer-service-evaluation .customer-service-modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    margin-top: 16px;
  }

  body[data-customer-realtime-mode="service-entry"] .customer-service-modal-actions .btn,
  body[data-customer-realtime-mode="service-entry"] .customer-service-reject-result .customer-service-modal-actions .btn,
  body[data-customer-realtime-mode="service-entry"] .customer-service-waiting-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    border-radius: 12px;
  }

  body[data-customer-realtime-mode="service-entry"] .customer-service-waiting-chip { display: inline-flex; }
  body[data-customer-realtime-mode="service-entry"] .customer-service-waiting-chip[hidden] { display: none; }
}

/* 窄屏最终覆盖放在文件末尾，避免历史手机规则回写为旧的卡片式布局。 */
@media (max-width: 1024px) {
  .customer-service-entry-main { width: 100%; height: 100dvh; min-height: 100svh; padding: 0; }
  .customer-service-entry { width: 100%; height: 100%; }
  .customer-service-media-canvas { height: 100%; max-height: none; aspect-ratio: auto; }
  .customer-service-workspace { height: 100%; }

  @media (max-width: 767px) {
    .customer-service-entry-main { width: 100%; padding: 0; }
    .customer-service-media-controls { position: relative; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  }
}

/* 手机服务工作区第一轮最终覆盖 */
@media (max-width: 767px) {
  html, body[data-customer-realtime-mode="service-entry"], body[data-customer-realtime-mode="service-entry"] #customerServiceMain { width: 100%; height: 100dvh; min-height: 100svh; overflow: hidden; }
  body[data-customer-realtime-mode="service-entry"] { background: #f2f5f9; }
  .customer-service-entry-main, .customer-service-entry { width: 100%; height: 100dvh; min-height: 100svh; margin: 0; padding: 0; }
  .customer-service-entry { display: grid; grid-template-rows: clamp(84px, 11dvh, 100px) minmax(0, 1fr) clamp(96px, 12dvh, 112px); overflow: hidden; background: #f2f5f9; }
  .customer-service-navigation { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; min-height: 0; height: 100%; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)); background: #fff; border-bottom: 1px solid #e4e9f0; box-shadow: 0 1px 5px rgba(23, 32, 51, .05); }
  .customer-service-mobile-context { min-width: 0; }
  .customer-service-mobile-status { color: #172033; font-size: 15px; line-height: 20px; }
  .customer-service-mobile-meta { font-size: 12px; line-height: 18px; }
  .customer-service-mobile-home { display: inline-flex; align-items: center; min-height: 44px; color: #2864dc; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
  .customer-service-entry .customer-service-start { min-width: 76px; min-height: 44px; margin: 0; padding: 0 10px; border-radius: 10px; font-size: 13px; }
  .customer-service-shell, .customer-service-entry[data-service-state="connected"] .customer-service-shell, .customer-service-workspace { display: contents !important; }
  .customer-service-media-layout { grid-row: 2; display: block; min-width: 0; min-height: 0; padding: clamp(8px, 3vw, 16px); overflow: hidden; }
  .customer-service-media-canvas { width: 100%; height: 100%; min-height: 0; max-height: none; aspect-ratio: auto; overflow: hidden; background: #111318; border: 1px solid #292e36; border-radius: clamp(12px, 3vw, 16px); box-shadow: 0 8px 20px rgba(17, 19, 24, .18); }
  .customer-service-video-stage .remote-stage video, .customer-service-video-stage .local-video-box video, .customer-service-screen-stage #remoteScreenVideo, .customer-service-screen-stage #localScreenVideo { width: 100%; height: 100%; object-fit: contain; object-position: center; }
  .customer-service-media-controls { grid-row: 3; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; min-height: 0; height: 100%; margin: 0 clamp(8px, 3vw, 12px) max(8px, env(safe-area-inset-bottom)); padding: 6px max(4px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left)); background: #fff; border: 1px solid #e4e9f0; border-radius: clamp(16px, 5vw, 20px); box-shadow: 0 4px 14px rgba(23, 32, 51, .08); }
  .customer-service-media-controls .customer-service-control { display: grid; grid-template-rows: 48px 16px; place-content: start center; gap: 3px; min-width: 0; min-height: 48px; padding: 0; }
  .customer-service-media-controls .customer-service-control::before { width: 48px; height: 48px; background-size: 23px 23px; }
  .customer-service-media-controls .customer-service-control::after { color: #5c667a; font-size: 11px; line-height: 16px; }
  .customer-service-mobile-more-panel { position: fixed; z-index: 80; right: 12px; bottom: calc(clamp(96px, 12dvh, 112px) + 14px + env(safe-area-inset-bottom)); left: 12px; }
  .customer-service-modal { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .38); }
  .customer-service-modal[hidden] { display: none; }
  .customer-service-modal-card { width: min(92vw, 520px); max-height: 72dvh; padding: 22px; overflow: auto; background: #fff; border: 0; border-radius: 18px; box-shadow: 0 18px 44px rgba(15, 23, 42, .24); }
  .customer-service-waiting-panel .customer-service-modal-card { width: min(92vw, 480px); min-height: 260px; }
  .customer-service-waiting-panel h3 { font-size: 20px; }
  .customer-service-waiting-actions .btn { width: 100%; min-height: 44px; }
  .customer-service-evaluation .customer-service-modal-card { padding: 22px; }
  .customer-service-evaluation .customer-service-file-actions { flex-direction: row; }
  .customer-service-result-next { margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid #e4e9f0; color: #172033; font-size: 15px; }
  .customer-service-evaluation .customer-service-modal-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  #customerServiceReturnHomeButton { color: #5c667a; background: transparent; border-color: transparent; }
  @media (orientation: landscape) { .customer-service-entry { grid-template-rows: 64px minmax(0, 1fr) 84px; } .customer-service-navigation { padding-top: 6px; padding-bottom: 6px; } .customer-service-media-controls { margin-bottom: 4px; } .customer-service-media-controls .customer-service-control { grid-template-rows: 42px 14px; } .customer-service-media-controls .customer-service-control::before { width: 42px; height: 42px; background-size: 22px 22px; } }
}

/* 群众手机 / 平板固定三槽：只有媒体 wrapper 的 data-slot 决定占槽。 */
@media (max-width: 1024px) {
  .customer-service-media-canvas {
    --customer-service-aux-width: clamp(76px, 18%, 150px);
    --customer-service-aux-edge: clamp(8px, 2.4%, 18px);
    --customer-service-aux-gap: clamp(6px, 1.4%, 12px);
  }

  /* 保留 DOM；中间层不再形成独立坐标或层叠上下文。 */
  .customer-service-entry .customer-service-video-panel,
  .customer-service-entry .customer-service-video-stage,
  .customer-service-entry .customer-service-media-floating-group {
    display: contents;
  }

  .customer-service-entry .customer-service-media-canvas :is(#localVideoWrapper, .remote-stage, #screenVideoWrapper)[data-slot] {
    position: absolute;
    inset: auto;
    display: block !important;
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    visibility: visible;
    background: #111318;
  }

  .customer-service-entry .customer-service-media-canvas :is(#localVideoWrapper, .remote-stage, #screenVideoWrapper)[data-slot="main"] {
    z-index: 4;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .customer-service-entry .customer-service-media-canvas :is(#localVideoWrapper, .remote-stage, #screenVideoWrapper):is([data-slot="aux-left"], [data-slot="aux-right"]) {
    z-index: 12;
    top: auto;
    right: var(--customer-service-aux-edge);
    bottom: var(--customer-service-aux-edge);
    left: auto;
    width: var(--customer-service-aux-width);
    height: auto;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
    pointer-events: auto;
    cursor: pointer;
  }

  .customer-service-entry .customer-service-media-canvas :is(#localVideoWrapper, .remote-stage, #screenVideoWrapper)[data-slot="aux-left"] {
    right: calc(var(--customer-service-aux-edge) + var(--customer-service-aux-width) + var(--customer-service-aux-gap));
  }

  .customer-service-entry .customer-service-media-canvas :is(#localVideoWrapper, .remote-stage, #screenVideoWrapper)[data-slot="hidden"] {
    display: none !important;
  }

  .customer-service-entry .customer-service-media-canvas [data-slot] :is(#localCameraVideo, #remoteCameraVideo, #remoteScreenVideo) {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  /* 仅原始竖屏摄像头占 MAIN 时居中裁切；横屏、未知尺寸及 AUX 保留 contain。 */
  .customer-service-entry .customer-service-media-canvas [data-slot="main"][data-camera-orientation="portrait"] :is(#localCameraVideo, #remoteCameraVideo) {
    object-fit: cover;
    object-position: center center;
  }

  .customer-service-entry .customer-service-media-canvas :is([data-slot="aux-left"], [data-slot="aux-right"])::before { position: absolute; z-index: 1; top: 6px; left: 6px; width: 16px; height: 16px; content: ""; pointer-events: none; background: center / 16px 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3H3v6M3 3l6 6M15 21h6v-6m0 6-6-6'/%3E%3C/svg%3E"); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
  .customer-service-picture-in-picture { position: absolute; z-index: 14; top: 10px; left: 10px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; color: #fff; background: rgba(17, 19, 24, .72); border: 1px solid rgba(255, 255, 255, .72); border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .24); cursor: pointer; }
  .customer-service-picture-in-picture:hover { background: rgba(17, 19, 24, .9); }
  .customer-service-picture-in-picture:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  .customer-service-picture-in-picture:disabled { cursor: default; }
  .customer-service-picture-in-picture svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
}
