html.mbti-resume-open {
  overflow: hidden;
}

.mbti-resume-backdrop {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background: rgba(20, 20, 22, 0.58);
  animation: mbti-resume-fade-in 180ms ease-out both;
}

.mbti-resume-dialog {
  box-sizing: border-box;
  position: relative;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  color: #252525;
  background: #fff;
  border: 1px solid #dedbd6;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(20, 20, 22, 0.24);
  animation: mbti-resume-enter 220ms ease-out both;
  -webkit-overflow-scrolling: touch;
}

.mbti-resume-content {
  padding: 28px;
}

.mbti-resume-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #6f6d68;
  font: 400 28px/1 Arial, Helvetica, sans-serif;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  touch-action: manipulation;
}

.mbti-resume-close:hover {
  color: #252525;
  background: #f3f2f0;
}

.mbti-resume-close:focus-visible,
.mbti-resume-action:focus-visible {
  outline: 3px solid rgba(169, 124, 45, 0.3);
  outline-offset: 2px;
}

.mbti-resume-eyebrow {
  display: block;
  margin: 0 48px 12px 0;
  color: #8b6629;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.mbti-resume-eyebrow--danger {
  color: #963a30;
}

.mbti-resume-title {
  margin: 0;
  color: #252525;
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}

.mbti-resume-description {
  margin: 12px 0 0;
  color: #65625d;
  font-size: 15px;
  line-height: 1.65;
}

.mbti-resume-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 20px;
  padding: 15px 16px;
  background: #f7f7f8;
  border: 1px solid #e5e3df;
  border-radius: 6px;
}

.mbti-resume-progress {
  color: #343332;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
}

.mbti-resume-time {
  color: #77746f;
  font-size: 13px;
  line-height: 1.5;
}

.mbti-resume-warning {
  margin-top: 20px;
  padding: 13px 14px;
  color: #765049;
  font-size: 13px;
  line-height: 1.55;
  background: #fff7f4;
  border-left: 3px solid #a94d3d;
}

.mbti-resume-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.mbti-resume-action {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  touch-action: manipulation;
}

.mbti-resume-action--primary {
  color: #fff;
  background: #252525;
  border-color: #252525;
}

.mbti-resume-action--primary:hover {
  background: #424242;
  border-color: #424242;
}

.mbti-resume-action--secondary {
  color: #4e4c48;
  background: #fff;
  border-color: #cbc8c2;
}

.mbti-resume-action--secondary:hover {
  color: #252525;
  background: #f7f7f8;
  border-color: #aaa69f;
}

.mbti-resume-action--danger {
  color: #fff;
  background: #963a30;
  border-color: #963a30;
}

.mbti-resume-action--danger:hover {
  background: #7d2f27;
  border-color: #7d2f27;
}

@keyframes mbti-resume-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mbti-resume-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
  .mbti-resume-backdrop {
    align-items: flex-end;
    padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .mbti-resume-dialog {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .mbti-resume-content {
    padding: 24px 20px 20px;
  }

  .mbti-resume-title {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mbti-resume-backdrop,
  .mbti-resume-dialog {
    animation: none;
  }

  .mbti-resume-action {
    transition: none;
  }
}
