.resume-ai-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #163f59;
  color: #fff;
  box-shadow: 0 16px 34px rgba(22, 63, 89, 0.24);
  font: 800 15px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
}

.resume-ai-launcher:hover,
.resume-ai-launcher:focus-visible {
  background: #102f43;
  outline: none;
}

.resume-ai-dot {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #d9fbe7;
  color: #0f7a3d;
  font-size: 12px;
  letter-spacing: 0;
}

.resume-ai-panel {
  position: fixed;
  right: 24px;
  bottom: 84px;
  z-index: 50;
  display: none;
  width: min(390px, calc(100vw - 32px));
  max-height: min(680px, calc(100dvh - 112px));
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #dbe2e8;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(23, 33, 43, 0.18);
}

.resume-ai-panel.is-open {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.resume-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f8fbfd 0%, #edf5f8 100%);
  border-bottom: 1px solid #dbe2e8;
}

.resume-ai-title {
  display: grid;
  gap: 2px;
}

.resume-ai-title strong {
  color: #162838;
  font-size: 16px;
  line-height: 1.3;
}

.resume-ai-title span {
  color: #64727d;
  font-size: 12px;
}

.resume-ai-close {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #dbe2e8;
  border-radius: 10px;
  background: #fff;
  color: #405260;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.resume-ai-close:hover,
.resume-ai-close:focus-visible {
  background: #eef3f6;
  outline: none;
}

.resume-ai-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
  background: #f6f8fa;
}

.resume-ai-message {
  display: grid;
  gap: 6px;
  max-width: 92%;
}

.resume-ai-message.is-user {
  justify-self: end;
}

.resume-ai-message.is-assistant {
  justify-self: start;
}

.resume-ai-bubble {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.62;
  white-space: pre-wrap;
}

.resume-ai-message.is-user .resume-ai-bubble {
  background: #1f5f83;
  color: #fff;
  border-bottom-right-radius: 5px;
}

.resume-ai-message.is-assistant .resume-ai-bubble {
  background: #fff;
  color: #24323d;
  border: 1px solid #e1e7ec;
  border-bottom-left-radius: 5px;
}

.resume-ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resume-ai-suggestion {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid #cbd8df;
  border-radius: 999px;
  background: #fff;
  color: #274255;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.resume-ai-suggestion:hover,
.resume-ai-suggestion:focus-visible {
  border-color: #1f5f83;
  color: #1f5f83;
  outline: none;
}

.resume-ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border-top: 1px solid #dbe2e8;
}

.resume-ai-input {
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #cbd8df;
  border-radius: 12px;
  color: #17212b;
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.resume-ai-input:focus {
  border-color: #1f5f83;
  outline: 3px solid rgba(31, 95, 131, 0.14);
}

.resume-ai-send {
  min-width: 72px;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: #1f5f83;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.resume-ai-send:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

@media (max-width: 560px) {
  .resume-ai-launcher {
    right: 16px;
    bottom: 16px;
    min-height: 46px;
    padding: 0 14px;
  }

  .resume-ai-panel {
    right: 12px;
    bottom: 74px;
    width: calc(100vw - 24px);
    max-height: min(680px, calc(100dvh - 92px));
    border-radius: 16px;
  }

  .resume-ai-header {
    padding: 13px 14px;
  }
}
