.operator-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #0a5c5c 0%, #084848 100%);
  color: #fff;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(8, 72, 72, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.operator-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(8, 72, 72, 0.42);
}

.operator-panel {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(72px, calc(env(safe-area-inset-bottom) + 56px));
  z-index: 9001;
  width: min(380px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.operator-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.operator-panel-chat {
  height: min(520px, calc(100vh - 120px));
  max-height: min(520px, calc(100vh - 120px));
}

.operator-panel-header {
  padding: 14px 16px 10px;
  background: linear-gradient(135deg, #0a5c5c 0%, #084848 100%);
  color: #fff;
  flex-shrink: 0;
}

.operator-panel-header h2 {
  margin: 0 0 2px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.operator-panel-header p {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.92;
}

.operator-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #f4f8f8;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.operator-chat-welcome {
  margin: auto;
  max-width: 260px;
  text-align: center;
  font-size: 0.875rem;
  color: #3d5c5c;
  line-height: 1.45;
  padding: 16px 8px;
}

.operator-chat-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.4;
}

.operator-chat-bubble.is-user {
  align-self: flex-end;
  background: #084848;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.operator-chat-bubble.is-support {
  align-self: flex-start;
  background: #fff;
  color: #1a3333;
  border: 1px solid #d8e8e8;
  border-bottom-left-radius: 4px;
}

.operator-chat-time {
  margin-top: 4px;
  font-size: 0.65rem;
  opacity: 0.65;
  text-align: right;
}

.operator-chat-bubble.is-support .operator-chat-time {
  text-align: left;
}

.operator-chat-compose {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e8f0f0;
  background: #fff;
  flex-shrink: 0;
}

.operator-chat-input {
  flex: 1;
  border: 1px solid #c5dede;
  border-radius: 999px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.875rem;
}

.operator-chat-send {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #084848;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.operator-chat-send:disabled {
  opacity: 0.5;
  cursor: wait;
}

.operator-chat-error {
  align-self: center;
  font-size: 0.78rem;
  color: #b42318;
  padding: 4px 8px;
}

body:has(.app-open-bar) .operator-fab {
  bottom: max(64px, calc(env(safe-area-inset-bottom) + 48px));
}

body:has(.app-open-bar) .operator-panel {
  bottom: max(120px, calc(env(safe-area-inset-bottom) + 104px));
}

@media (max-width: 480px) {
  .operator-fab-label {
    display: none;
  }

  .operator-fab {
    padding: 14px;
    border-radius: 50%;
  }
}
