:root {
  --ink: #020e19;
  --muted: #475058;
  --blue: #00a3ff;
  --mint: #00d9c8;
  --pale-blue: #e2f4ff;
  --surface: #ffffff;
  --page-gradient: linear-gradient(180deg, #ffffff 0%, #ffffff 70%, #e3f3fd 100%);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  color: var(--ink);
  background: var(--page-gradient);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: 100% 100svh;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 3px solid rgba(0, 163, 255, 0.35);
  outline-offset: 3px;
}

.app-shell {
  position: relative;
  width: min(100%, 360px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: visible;
  background: transparent;
}

.screen {
  min-height: 100svh;
}

.question-screen {
  padding: 36px 20px 92px;
}

.question-content.page-enter {
  animation: question-in-right 220ms ease-out both;
}

.question-content.page-exit {
  animation: question-out-left 220ms ease-in both;
}

.pagination {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}

.pagination span {
  height: 4px;
  border-radius: 999px;
  background: var(--pale-blue);
  transition: background-color 180ms ease;
}

.pagination span.active {
  background: var(--mint);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 36px;
}

.nav-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: #f3f8fc;
  box-shadow: none;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.nav-button:disabled {
  cursor: not-allowed;
  visibility: hidden;
  pointer-events: none;
}

.nav-button.right {
  justify-self: end;
}

.nav-button img {
  display: block;
  width: auto;
  max-width: 8px;
  height: 13px;
}

.nav-button.right img {
  transform: rotate(180deg);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.48px;
}

.brand img {
  width: 24px;
  height: 24px;
}

.question-heading {
  margin: 38px 0 16px;
  font-size: 24px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: -0.72px;
}

.question-heading .emphasis,
.result-heading .emphasis {
  color: var(--blue);
}

.question-subcopy {
  margin: -6px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.option-list {
  display: grid;
  gap: 8px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 17px 20px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: #f4f5f9;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.option-card:hover {
  transform: translateY(-1px);
}

.option-card.selected {
  border-color: rgba(0, 163, 255, 0.6);
  background: rgba(0, 163, 255, 0.05);
}

.option-label {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.32px;
}

.radio {
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1.5px solid #dee4ec;
  border-radius: 50%;
  background: #fff;
}

.radio img {
  width: 18px;
  height: 18px;
}

.option-card.selected .radio {
  border-color: transparent;
  background: transparent;
}

.page-indicator {
  position: fixed;
  z-index: 3;
  bottom: 18px;
  left: 50%;
  display: grid;
  min-width: 45px;
  height: 27px;
  place-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.28px;
  transform: translateX(-50%);
  box-shadow: 0 4px 16px rgba(2, 14, 25, 0.06);
}

.loading-screen {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 20px;
  text-align: center;
}

.loading-content {
  display: grid;
  justify-items: center;
  gap: 20px;
  margin-top: -12px;
}

.loading-icon {
  width: 48px;
  height: 48px;
  animation: loading-spin 2.8s linear infinite, loading-breathe 1.4s ease-in-out infinite;
}

.loading-copy {
  display: grid;
  gap: 4px;
}

.loading-title {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -0.6px;
}

.loading-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.32px;
}

.result-screen {
  min-height: 100svh;
  padding: 60px 20px 124px;
  overflow-y: auto;
}

.result-screen > .brand {
  display: flex;
  width: 100%;
  height: 29px;
}

.result-heading {
  margin: 36px 0 20px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.72px;
}

.mentor-card {
  display: grid;
  gap: 16px;
  padding: 4px 4px 16px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 0 10px rgba(4, 26, 39, 0.1);
}

.mentor-thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 20px;
  background: #dff6f5;
}

.mentor-body {
  display: grid;
  gap: 20px;
  padding: 0 16px;
}

.mentor-info {
  display: grid;
  gap: 8px;
}

.mentor-product-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.48px;
}

.mentor-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.mentor-name-row {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #25313d;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.verified-badge {
  width: 16px;
  height: 16px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  color: #475058;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}

.stat-icon {
  display: inline-flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: -2px;
}

.stat-icon img {
  display: block;
  width: auto;
  height: auto;
  object-fit: initial;
}

.stat-icon-star img {
  width: 13.119px;
  height: 12.579px;
}

.stat-icon-avatar img {
  width: 10px;
  height: 12.857px;
}

.detail-button {
  display: grid;
  place-items: center;
  width: 100%;
  height: 48px;
  margin-top: 0;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: filter 160ms ease, transform 160ms ease;
}

.detail-button:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.review-section {
  display: grid;
  gap: 20px;
  margin-top: 36px;
}

.review-list {
  display: grid;
  gap: 8px;
}

.section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.54px;
}

.review-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  background: white;
  box-shadow: 0 5px 7.5px rgba(4, 26, 39, 0.1);
}

.review-head,
.review-rating-row,
.review-rating {
  display: flex;
  align-items: center;
}

.review-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.review-author {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.review-rating-row {
  gap: 4px;
}

.review-rating {
  gap: 0;
}

.review-rating img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.review-date {
  color: #7f8a95;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.review-text {
  margin: 0;
  color: #25313d;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.28px;
}

.result-actions {
  position: fixed;
  z-index: 2;
  bottom: 0;
  left: 50%;
  display: flex;
  gap: 8px;
  width: min(100%, 360px);
  justify-content: center;
  padding: 10px 10px 24px;
  background: linear-gradient(180deg, rgba(227, 243, 253, 0) 0%, #e3f3fd 31%);
  transform: translateX(-50%);
}

.result-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 34px;
  padding: 8px 16px;
  border-radius: 999px;
  background: white;
  color: #009bf3;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.action-icon {
  display: inline-flex;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.action-icon img {
  display: block;
  width: auto;
  height: auto;
  object-fit: initial;
}

.action-icon-reset img {
  width: 12.963px;
  height: 12.963px;
}

.action-icon-share img {
  width: 10.961px;
  height: 13.95px;
}

.modal-backdrop {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 20px;
  background: rgba(2, 14, 25, 0.42);
}

.modal {
  position: relative;
  width: min(100%, 360px);
  max-height: min(78svh, 620px);
  overflow: auto;
  padding: 24px 20px 22px;
  border-radius: 24px 24px 16px 16px;
  background: white;
  box-shadow: 0 -10px 28px rgba(2, 14, 25, 0.12);
  animation: modal-in 180ms ease-out both;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f2f6f9;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-kicker {
  margin: 0 38px 8px 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 750;
}

.modal-title {
  margin: 0 36px 18px 0;
  font-size: 21px;
  font-weight: 750;
  line-height: 1.42;
  letter-spacing: -0.6px;
}

.modal-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.modal-list div {
  display: grid;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f4;
}

.modal-list dt {
  color: #7d8790;
  font-size: 12px;
  font-weight: 650;
}

.modal-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.modal-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  z-index: 20;
  bottom: 24px;
  left: 50%;
  max-width: calc(100vw - 40px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(2, 14, 25, 0.86);
  color: white;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

@keyframes loading-breathe {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes question-in-right {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes question-out-left {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-28px); }
}

@media (min-width: 520px) {
  body {
    padding: 0;
  }

  .app-shell {
    min-height: 100svh;
    border-radius: 0;
    box-shadow: none;
  }

  .screen,
  .loading-screen {
    min-height: 100svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
