.rs-request-btn,
.rs-admin-bell,
.rs-button {
  border: 0;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}

.rs-request-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  background: var(--ink, #6E6E75);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.rs-request-btn:disabled {
  opacity: .55;
  cursor: wait;
}

.rs-modal-backdrop,
.rs-controller {
  position: fixed;
  inset: 0;
  z-index: 1000000;
}

.rs-modal-backdrop {
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(3px);
}

.rs-consent-card {
  box-sizing: border-box;
  width: min(480px, 100%);
  padding: 28px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
}

.rs-consent-card h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 22px;
}

.rs-consent-card p,
.rs-consent-card li {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
  word-break: keep-all;
}

.rs-consent-card ul {
  margin: 14px 0 20px;
  padding-left: 20px;
}

.rs-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.rs-button {
  min-height: 40px;
  padding: 0 16px;
  color: #374151;
  background: #f3f4f6;
}

.rs-button-primary {
  color: #fff;
  background: #1F1D1A;
}

.rs-button-danger {
  color: #fff;
  background: #dc2626;
}

.rs-session-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 999995;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 24px);
  padding: 9px 10px 9px 16px;
  border: 1px solid #e8e8e4;
  border-radius: 999px;
  color: #1A1A1A;
  background: #EDEFF3;
  box-shadow: 0 8px 28px rgba(30, 64, 175, .18);
  transform: translateX(-50%);
}

.rs-session-banner strong {
  white-space: nowrap;
  font-size: 13px;
}

.rs-session-banner button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #dc2626;
  font-weight: 800;
  cursor: pointer;
}

.rs-remote-cursor {
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 18px;
  height: 24px;
  pointer-events: none;
  transform: translate(-2px, -2px);
}

.rs-remote-cursor::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 16px solid #1F1D1A;
  border-right: 10px solid transparent;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .25));
}

.rs-remote-cursor span {
  position: absolute;
  top: 14px;
  left: 8px;
  padding: 3px 6px;
  border-radius: 5px;
  color: #fff;
  background: #1F1D1A;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.rs-drawing-canvas {
  position: fixed;
  inset: 0;
  z-index: 999996;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.rs-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000002;
}

.rs-chat.is-admin {
  right: auto;
  left: 18px;
}

.rs-chat.is-admin .rs-chat-toggle {
  float: left;
}

.rs-chat-toggle {
  float: right;
  min-width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #1f2937;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .24);
  font-weight: 900;
  cursor: pointer;
}

.rs-chat-panel {
  display: none;
  width: min(340px, calc(100vw - 36px));
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(15, 23, 42, .24);
}

.rs-chat.is-open .rs-chat-panel {
  display: block;
}

.rs-chat-head {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  color: #fff;
  background: #1f2937;
  font-size: 13px;
  font-weight: 800;
}

.rs-chat-head button {
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.rs-chat-messages {
  height: 220px;
  padding: 12px;
  overflow-y: auto;
  background: #f8fafc;
}

.rs-chat-message {
  width: fit-content;
  max-width: 85%;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px 10px 10px 2px;
  color: #1f2937;
  background: #e5e7eb;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.rs-chat-message.is-mine {
  margin-left: auto;
  border-radius: 10px 10px 2px 10px;
  color: #fff;
  background: #1F1D1A;
}

.rs-chat-form {
  display: flex;
  gap: 6px;
  padding: 9px;
  border-top: 1px solid #e5e7eb;
}

.rs-chat-form input {
  min-width: 0;
  flex: 1;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: inherit;
}

.rs-chat-form button {
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #1F1D1A;
  font-weight: 800;
  cursor: pointer;
}

.rs-admin-bell {
  position: fixed;
  right: 20px;
  top: 76px;
  z-index: 900000;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  color: #fff;
  background: #dc2626;
  box-shadow: 0 8px 24px rgba(220, 38, 38, .26);
}

.rs-admin-bell.is-ready {
  display: inline-flex;
}

.rs-admin-bell-count {
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  color: #dc2626;
  background: #fff;
  line-height: 21px;
}

.rs-pending-panel {
  position: fixed;
  right: 20px;
  top: 124px;
  z-index: 900000;
  display: none;
  width: min(380px, calc(100vw - 40px));
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(15, 23, 42, .24);
}

.rs-pending-panel.is-open {
  display: block;
}

.rs-pending-head,
.rs-pending-card {
  padding: 14px;
}

.rs-pending-head {
  border-bottom: 1px solid #e5e7eb;
  font-weight: 900;
}

.rs-pending-card + .rs-pending-card {
  border-top: 1px solid #eef2f7;
}

.rs-pending-card strong,
.rs-pending-card span {
  display: block;
}

.rs-pending-card span {
  margin: 4px 0 10px;
  color: #6b7280;
  font-size: 12px;
}

.rs-controller {
  display: flex;
  flex-direction: column;
  color: #f8fafc;
  background: #0f172a;
}

.rs-controller-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.rs-controller-title {
  min-width: 0;
  margin-right: auto;
}

.rs-controller-title strong,
.rs-controller-title span {
  display: block;
}

.rs-controller-title span {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
}

.rs-tool {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  color: #f8fafc;
  background: rgba(255, 255, 255, .08);
  font-weight: 800;
  cursor: pointer;
}

.rs-tool.is-active {
  color: #fff;
  border-color: #1F1D1A;
  background: #1F1D1A;
}

.rs-tool-setting {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.rs-tool-setting select {
  height: 36px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  color: #f8fafc;
  background: #1e293b;
  font: inherit;
}

.rs-controller-stage {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background: #020617;
}

.rs-controller video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rs-controller .rs-drawing-canvas {
  position: absolute;
  z-index: 3;
}

.rs-controller .rs-remote-cursor {
  position: absolute;
}

.rs-controller-status {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  padding: 10px 14px;
  border-radius: 8px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, .82);
  transform: translate(-50%, -50%);
}

.rs-key-capture {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.rs-text-editor {
  position: absolute;
  z-index: 4;
  display: flex;
  width: min(272px, calc(100% - 16px));
  padding: 5px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .32);
}

.rs-text-editor input {
  min-width: 0;
  flex: 1;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px 0 0 6px;
  font-family: inherit;
}

.rs-text-editor button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 0 6px 6px 0;
  color: #fff;
  background: #1F1D1A;
  font-weight: 800;
}

/* 업체 화면의 <select> 목록을 관리자 쪽에서 대신 고르는 창 */
.rs-select-picker {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: min(252px, calc(100% - 16px));
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .38);
}

.rs-select-picker-head {
  padding: 8px 12px;
  color: #fff;
  background: #1f2937;
  font-size: 12px;
  font-weight: 800;
}

.rs-select-picker-list {
  max-height: 260px;
  overflow-y: auto;
}

.rs-select-picker-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  color: #1f2937;
  background: #fff;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.rs-select-picker-item:hover:not(:disabled) {
  background: #EDEFF3;
}

.rs-select-picker-item.is-selected {
  color: #1F1D1A;
  font-weight: 800;
}

.rs-select-picker-item:disabled {
  color: #9ca3af;
  cursor: not-allowed;
}

.rs-select-picker-close {
  padding: 9px;
  border: 0;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  background: #f8fafc;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.rs-session-banner .rs-resume-share {
  background: #1F1D1A;
}

/* 관리자 전용 대화 기록 */
.rs-pending-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rs-log-open {
  padding: 5px 10px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #374151;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.rs-log-body {
  max-height: 52vh;
  margin: 6px 0 18px;
  overflow-y: auto;
  color: #374151;
  font-size: 13px;
}

.rs-log-empty {
  color: #6b7280;
}

.rs-log-session {
  margin: 14px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.rs-log-line {
  margin: 4px 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.rs-log-line span {
  display: inline-block;
  min-width: 34px;
  margin-right: 6px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
}

.rs-log-line.is-admin span {
  color: #1F1D1A;
}

@media (max-width: 768px) {
  .rs-request-btn {
    display: none !important;
  }

  .rs-controller-title {
    width: 100%;
  }
}
