:root {
  --nkq-bg: #f6fbfb;
  --nkq-card: #ffffff;
  --nkq-txt: #0f172a;
  --nkq-muted: #64748b;
  --nkq-line: #e2e8f0;
  --nkq-brand: #0ea5a4;
  --nkq-brand2: #22c55e;
  --nkq-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --nkq-radius: 18px;
}

.nkq-wrap {
  background: var(--nkq-bg);
  padding: 18px 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  color: var(--nkq-txt);
}

.nkq {
  max-width: 520px;
  margin: 0 auto;
}

.nkq-card {
  background: var(--nkq-card);
  border: 1px solid var(--nkq-line);
  border-radius: var(--nkq-radius);
  box-shadow: var(--nkq-shadow);
  overflow: hidden;
}

.nkq-resume {
  border: 1px solid var(--nkq-line);
  background: #eef9f9;
  color: var(--nkq-txt);
  padding: 10px 12px;
  border-radius: 14px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.3;
}

.nkq-resume-btns {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.nkq-top {
  padding: 14px 16px;
  border-bottom: 1px solid var(--nkq-line);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.nkq-pill {
  font-size: 12px;
  color: var(--nkq-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.nkq-pill b {
  color: var(--nkq-txt);
  font-weight: 900;
}

.nkq-progress {
  height: 8px;
  background: #e9f4f4;
  border-radius: 999px;
  overflow: hidden;
  flex: 1;
}

.nkq-progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--nkq-brand), #38bdf8);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.nkq-body {
  padding: 16px;
  min-height: 300px;
}

.nkq-step {
  opacity: 0;
  transform: translateY(4px);
}

.nkq-step.in {
  animation: nkqStepIn 220ms ease forwards;
}

@keyframes nkqStepIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nkq-title {
  font-size: 18px;
  line-height: 1.25;
  margin: 0 0 10px;
  font-weight: 900;
}

.nkq-sub {
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 14px;
  color: var(--nkq-muted);
  white-space: pre-line;
}

.nkq-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.nkq-btn {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--nkq-line);
  background: #fff;
  font-size: 15px;
  font-weight: 800;
  color: var(--nkq-txt);
  cursor: pointer;
  text-align: left;
  transition: transform 0.04s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nkq-btn:active {
  transform: scale(0.99);
}

.nkq-btn:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.nkq-btn:focus-visible,
.nkq-link:focus-visible,
.nkq-cta:focus-visible,
.nkq-cta2:focus-visible {
  outline: 3px solid rgba(14, 165, 164, 0.35);
  outline-offset: 2px;
}

.nkq-btn.is-active {
  border-color: var(--nkq-brand);
  box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.12);
}

.nkq-ico {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  font-size: 18px;
  flex: 0 0 auto;
}

.nkq-foot {
  padding: 14px 16px;
  border-top: 1px solid var(--nkq-line);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.nkq-link {
  appearance: none;
  border: none;
  background: transparent;
  padding: 8px 6px;
  color: var(--nkq-muted);
  font-weight: 800;
  cursor: pointer;
  font-size: 13px;
}

.nkq-cta {
  appearance: none;
  border: none;
  background: linear-gradient(90deg, var(--nkq-brand), var(--nkq-brand2));
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
}

.nkq-cta[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.nkq-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #0b3b3b;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: 6px 10px;
  border-radius: 999px;
}

.nkq-report {
  white-space: pre-line;
  font-size: 14px;
  line-height: 1.45;
  color: var(--nkq-txt);
  margin-top: 12px;
}

.nkq-cta2 {
  display: block;
  width: 100%;
  text-decoration: none;
  text-align: center;
  margin-top: 12px;
  padding: 14px 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #fff;
  font-weight: 900;
}

.nkq-cta-ai {
  background: linear-gradient(90deg, #07b6b4, #22c55e);
  border: none;
  cursor: pointer;
}

.nkq-cta-secondary {
  background: #0f172a;
}

.nkq-small {
  font-size: 12px;
  color: var(--nkq-muted);
  margin-top: 10px;
}

.nkq-chat-open {
  overflow: hidden;
}

.nkq-chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 9999;
}

.nkq-chat-modal {
  width: min(680px, 100%);
  max-height: min(90vh, 760px);
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  overflow: hidden;
}

.nkq-chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.nkq-chat-title {
  font-size: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
}

.nkq-chat-close {
  border: none;
  background: transparent;
  font-size: 44px;
  line-height: 0.7;
  padding: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.nkq-chat-preview {
  position: relative;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 14px;
  background: #f8fcfc;
}

.nkq-chat-preview-title {
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 8px;
}

.nkq-chat-preview-visible,
.nkq-chat-preview-blur {
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-line;
}

.nkq-chat-preview-blur {
  filter: blur(5px);
  user-select: none;
  margin-top: 6px;
}

.nkq-chat-preview-mask {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px 14px 12px;
  background: linear-gradient(180deg, rgba(248, 252, 252, 0), rgba(248, 252, 252, 0.95) 30%, #f8fcfc 100%);
}

.nkq-chat-lock-text {
  font-size: 13px;
  color: #334155;
}

.nkq-chat-lock-price {
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
  margin-top: 3px;
}

.nkq-chat-list {
  overflow: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  min-height: 64px;
}

.nkq-chat-msg {
  white-space: pre-line;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
}

.nkq-chat-msg-assistant {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.nkq-chat-msg-user {
  align-self: flex-end;
  background: #dbf4f4;
  border: 1px solid #bde7e6;
}

.nkq-chat-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.nkq-chat-input {
  resize: none;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px;
  font: inherit;
}

.nkq-chat-send {
  border: none;
  border-radius: 12px;
  padding: 0 14px;
  background: #0f172a;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.nkq-chat-pay {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.nkq-chat-field {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px;
  font: inherit;
}

.nkq-chat-pay-btn {
  border: none;
  border-radius: 12px;
  padding: 0 14px;
  background: linear-gradient(90deg, var(--nkq-brand), var(--nkq-brand2));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nkq-chat-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .nkq-chat-modal {
    width: 100%;
    max-width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 18px 18px 0 0;
    border-bottom: none;
    grid-template-rows: auto auto 1fr auto auto;
  }

  .nkq-chat-head {
    padding: 8px 10px;
  }

  .nkq-chat-title {
    font-size: 18px;
  }

  .nkq-chat-close {
    width: 36px;
    height: 36px;
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  .nkq-chat-input-wrap {
    grid-template-columns: 1fr;
  }

  .nkq-chat-send {
    min-height: 44px;
  }

  .nkq-chat-pay {
    grid-template-columns: 1fr;
  }

  .nkq-chat-pay-btn {
    min-height: 48px;
  }
}
