:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #161b28;
  --muted: #5e6676;
  --line: #dfe4ef;
  --primary: #0064ff;
  --primary-pressed: #0054d8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #eeeff8;
}

.app-shell {
  width: min(760px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 24px 40px;
  display: flex;
}

.screen {
  display: none;
  width: 100%;
}

.screen.active {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.start-screen {
  gap: 20px;
}

.start-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-self: flex-start;
  margin: 0;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  background: transparent;
  border: 2px solid #b8c8f8;
}

.language-toggle {
  flex: 0 0 auto;
  min-width: 104px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #b8c8f8;
  border-radius: 999px;
  background: #ffffff;
  color: #3459d6;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(37, 63, 146, 0.08);
}

.language-toggle:active {
  background: #edf3ff;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 2px;
  font-size: clamp(42px, 9vw, 62px);
  line-height: 1.14;
  letter-spacing: -0.6px;
}

.title-accent {
  color: #3f5fdb;
}

.subtitle {
  color: #616d82;
  font-size: clamp(26px, 4.8vw, 44px);
  line-height: 1.38;
  letter-spacing: -0.2px;
}

.start-visual {
  position: relative;
  margin-top: 4px;
  border: 1px solid #d5dcf2;
  border-radius: 40px;
  background: #d2dcf9;
  height: clamp(320px, 45vh, 520px);
  padding: 0;
  overflow: hidden;
}

.start-team-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  padding: 14px 18px 0;
}

.start-official-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 104px;
  height: 104px;
  border-radius: 999px;
  border: 1px solid #d8deef;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.start-official-badge img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.info-card {
  margin-top: 0;
  padding: 28px 26px;
  border-radius: 34px;
  background: #ffffff;
  border: 1px solid #dde4f5;
}

.info-card h2 {
  font-size: clamp(34px, 6.2vw, 44px);
  line-height: 1.22;
  letter-spacing: -0.4px;
}

.info-card ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: #465266;
  line-height: 1.55;
}

.info-card li {
  position: relative;
  padding-left: 30px;
  font-size: clamp(22px, 4.2vw, 30px);
}

.info-card li + li {
  margin-top: 12px;
}

.info-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #3f5fdb;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  margin-top: auto;
  color: #fff;
  background: #3f5ed9;
  border-radius: 32px;
  min-height: 86px;
  font-size: clamp(34px, 5.8vw, 44px);
  letter-spacing: -0.3px;
}

.btn-primary:active {
  background: var(--primary-pressed);
}

.btn-secondary {
  color: var(--text);
  background: #eef2fb;
  border: 1px solid #d9e2f3;
}

.btn-secondary:active {
  background: #dde7fb;
}

.btn-ghost {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 14px;
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#question-screen.active {
  gap: 20px;
}

#question-screen .btn-ghost {
  min-height: 52px;
  border-radius: 14px;
  padding: 0 18px;
  font-size: clamp(20px, 3.2vw, 30px);
  font-weight: 700;
  background: #e5eaf8;
  border: 1px solid transparent;
  color: #3f5ed9;
}

#progress-text {
  color: #6a7385;
  font-weight: 700;
  font-size: clamp(22px, 3.8vw, 36px);
}

.progress-track {
  width: 100%;
  height: 16px;
  border-radius: 99px;
  background: #e4e9fa;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #3e5ed9;
  transition: width 240ms ease;
}

.question-label {
  margin-top: 8px;
  align-self: flex-start;
  padding: 7px 16px;
  border-radius: 12px;
  background: #e6ebf9;
  color: #3f5ed9;
  font-size: clamp(20px, 3.4vw, 32px);
  font-weight: 700;
}

.question-title {
  margin-top: 4px;
  font-size: clamp(34px, 5.8vw, 46px);
  line-height: 1.22;
  letter-spacing: -0.5px;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.answer-btn {
  border: 1px solid #dfe5f6;
  background: #ffffff;
  color: var(--text);
  border-radius: 24px;
  padding: 18px 22px;
  text-align: left;
  font-size: clamp(24px, 3.8vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.25px;
  cursor: pointer;
  font-weight: 600;
}

.answer-btn:hover {
  border-color: #b7c5ed;
}

.answer-btn:active {
  background: #f3f6ff;
}

.result-card {
  border: 1px solid #d4ddf4;
  border-radius: 26px;
  padding: 18px;
  background: #f5f8ff;
  box-shadow: 0 8px 20px rgba(37, 63, 146, 0.08);
}

.result-title {
  margin-top: 4px;
  font-size: clamp(34px, 8vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.3px;
  color: #315fda;
}

.result-desc {
  color: var(--muted);
  line-height: 1.65;
  white-space: pre-line;
  font-size: 16px;
}

.result-visual-wrap {
  width: 100%;
  border-radius: 22px;
  background: #e5edff;
  padding: 12px;
  margin-bottom: 12px;
}

.result-visual-inner {
  border-radius: 18px;
  border: 1px solid #d5dff6;
  background: #eaf0ff;
  overflow: hidden;
}

.result-visual {
  display: block;
  width: 100%;
  height: clamp(340px, 48vh, 560px);
  object-fit: contain;
  padding: 0;
}

.tips {
  margin-top: 12px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #dbe3f6;
}

.tips h3 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.3px;
  color: #3459d6;
}

.tips ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--muted);
  line-height: 1.7;
}

.tips li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.tips li + li {
  margin-top: 6px;
}

.tip-icon {
  color: #3f64de;
  font-weight: 700;
  margin-top: 1px;
}

.tip-text {
  flex: 1;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.icon-btn img {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.icon-btn span {
  display: inline-block;
}

.brand-logos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.brand-logo-link {
  border: 1px solid #d5ddf2;
  border-radius: 16px;
  background: #fff;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  overflow: hidden;
  min-width: 0;
}

.brand-logo-link img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

#result-screen.active {
  gap: 10px;
  border-radius: 26px;
  border: 1px solid #d2dbf1;
  background: #edf2ff;
  padding: 16px 14px 140px;
}

.result-retry {
  margin-top: 14px;
}

.result-retry-inline {
  margin-top: 2px;
}

.benefit-entry-btn {
  margin-top: 8px;
  border-radius: 14px;
  min-height: 54px;
  font-size: 16px;
  font-weight: 700;
}

.sok-emphasis {
  color: #ffdd63;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.start-cta-fixed,
.result-cta-fixed {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  width: min(620px, calc(100vw - 56px));
  z-index: 120;
  margin-top: 0;
  min-height: 58px;
  border-radius: 18px;
  font-size: clamp(20px, 3.4vw, 30px);
  box-shadow: 0 10px 24px rgba(38, 66, 158, 0.28);
}

.benefit-back-fixed {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  width: min(620px, calc(100vw - 56px));
  z-index: 120;
  margin-top: 0;
  min-height: 58px;
  border-radius: 18px;
  font-size: clamp(20px, 3.4vw, 30px);
  box-shadow: 0 10px 24px rgba(38, 66, 158, 0.28);
}

#start-screen.active,
#result-screen.active,
#benefit-screen.active {
  padding-bottom: 140px;
}

#result-screen[data-type='EJ'].active {
  background: #eaf5ff;
  border-color: #c9dfff;
}

#result-screen[data-type='EP'].active {
  background: #fff0f7;
  border-color: #f1cce1;
}

#result-screen[data-type='IJ'].active {
  background: #f3edff;
  border-color: #d9ccf4;
}

#result-screen[data-type='IP'].active {
  background: #eef7e8;
  border-color: #cfe3c1;
}

#result-screen[data-type='EJ'] .result-title,
#result-screen[data-type='EJ'] .tips h3 {
  color: #2f75dd;
}

#result-screen[data-type='EP'] .result-title,
#result-screen[data-type='EP'] .tips h3 {
  color: #e45f95;
}

#result-screen[data-type='IJ'] .result-title,
#result-screen[data-type='IJ'] .tips h3 {
  color: #6a50c9;
}

#result-screen[data-type='IP'] .result-title,
#result-screen[data-type='IP'] .tips h3 {
  color: #3b8d56;
}

.benefit-screen {
  gap: 12px;
}

.benefit-header {
  display: none;
}

.benefit-hero-card {
  border: 1px solid #d8e1f5;
  border-radius: 22px;
  background: #ffffff;
  padding: 14px;
}

.benefit-hero-caption {
  margin-top: 10px;
  color: #161b28;
  font-size: clamp(16px, 2.4vw, 22px);
  font-weight: 700;
  letter-spacing: -0.2px;
}

.benefit-caption-accent {
  color: #355fdb;
}

.benefit-logo-wrap {
  margin-top: 2px;
  border: 1px solid #dce3f4;
  border-radius: 18px;
  background: #f7f9ff;
  padding: 10px;
  display: flex;
  justify-content: center;
}

.benefit-logo {
  display: block;
  width: min(370px, 90vw);
  height: auto;
  object-fit: contain;
}

.benefit-type-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.benefit-type-thumb {
  width: 86px;
  height: 86px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid #dbe3f6;
  background: #ffffff;
}

.benefit-type-label {
  color: #3d5fdc;
  font-size: clamp(16px, 2.6vw, 20px);
  font-weight: 700;
}

.benefit-type-name {
  margin-top: 2px;
  font-size: clamp(28px, 4.2vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.3px;
}

.benefit-reason-card,
.benefit-tip-card {
  border: 2px solid #f0c84f;
  border-radius: 22px;
  background: #fff8e7;
  padding: 18px;
}

.benefit-reason-card h3 {
  margin: 0 0 6px;
  color: #9a4b09;
  font-size: clamp(22px, 3.4vw, 28px);
}

.benefit-reason-card p {
  color: #9a4b09;
  font-size: clamp(15px, 2.5vw, 19px);
  line-height: 1.6;
}

.benefit-feature-card,
.benefit-guide-card,
.benefit-cta-card {
  border: 1px solid #d8e0f3;
  border-radius: 22px;
  background: #ffffff;
  overflow: hidden;
}

.benefit-feature-card {
  padding: 18px;
}

.benefit-feature-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.benefit-feature-head h3 {
  margin: 0;
  font-size: clamp(23px, 3.6vw, 30px);
}

.benefit-feature-icon {
  font-size: 30px;
}

.benefit-feature-badge {
  margin-left: auto;
  background: #e8efff;
  color: #3a5ed9;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: clamp(13px, 2vw, 16px);
  font-weight: 700;
}

.benefit-feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 10px;
}

.benefit-chip {
  display: grid;
  grid-template-rows: auto auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #dbe4f8;
  border-radius: 16px;
  background: #ffffff;
  color: #2f55cf;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.benefit-chip img {
  display: block;
  width: 100%;
  height: auto;
  padding: 6px;
  background: #f5f7fd;
}

.benefit-chip span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 12px;
  background: #edf3ff;
}

.benefit-feature-card p,
.benefit-guide-card p,
.benefit-cta-card p {
  color: #616a7f;
  font-size: clamp(15px, 2.5vw, 19px);
  line-height: 1.6;
}

.benefit-guide-card h3 {
  margin: 0;
  padding: 16px 18px 12px;
  color: #161b28;
  font-size: clamp(21px, 3.3vw, 27px);
}

.benefit-guide-accent {
  color: #3d5fdc;
}

.benefit-guide-images {
  display: grid;
  padding: 0 12px 12px;
}

.benefit-guide-visual {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  background: #ffffff;
  object-fit: contain;
}

.benefit-guide-card p {
  padding: 18px;
  display: flex;
  align-items: center;
}

.benefit-tip-card p {
  margin: 0;
  color: #9a4b09;
  font-size: clamp(15px, 2.5vw, 19px);
  line-height: 1.65;
}

.benefit-cta-card {
  padding: 18px;
}

.benefit-cta-card h3 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.2;
}

.benefit-cta-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.benefit-store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  min-height: 74px;
  border-radius: 18px;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
}

.benefit-store-btn img {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.benefit-store-btn span {
  display: inline-block;
}

#benefit-screen[data-type='EJ'] .benefit-type-name {
  color: #2f75dd;
}

#benefit-screen[data-type='EJ'] .benefit-type-label {
  color: #2f75dd;
}

#benefit-screen[data-type='EP'] .benefit-type-name {
  color: #e45f95;
}

#benefit-screen[data-type='EP'] .benefit-type-label {
  color: #e45f95;
}

#benefit-screen[data-type='IJ'] .benefit-type-name {
  color: #6a50c9;
}

#benefit-screen[data-type='IJ'] .benefit-type-label {
  color: #6a50c9;
}

#benefit-screen[data-type='IP'] .benefit-type-name {
  color: #3b8d56;
}

#benefit-screen[data-type='IP'] .benefit-type-label {
  color: #3b8d56;
}

@media (max-width: 420px) {
  .app-shell {
    padding: 20px 20px 34px;
  }

  .start-screen {
    gap: 16px;
  }

  .badge {
    padding: 8px 18px;
    font-size: 13px;
    border-width: 1.5px;
  }

  h1 {
    font-size: 46px;
    line-height: 1.14;
  }

  .subtitle {
    font-size: 17px;
  }

  .start-visual {
    height: 280px;
    border-radius: 28px;
  }

  .start-team-logo {
    padding: 10px 12px 0;
  }

  .start-official-badge {
    width: 64px;
    height: 64px;
    padding: 10px;
    top: 12px;
    right: 12px;
  }

  .info-card {
    padding: 22px 20px;
    border-radius: 24px;
  }

  .info-card h2 {
    font-size: 24px;
  }

  .info-card li {
    font-size: 18px;
    padding-left: 22px;
  }

  .info-card li::before {
    width: 10px;
    height: 10px;
  }

  .btn-primary {
    min-height: 64px;
    border-radius: 22px;
    font-size: 21px;
  }

  .start-cta-fixed,
  .result-cta-fixed,
  .benefit-back-fixed {
    width: calc(100vw - 24px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    min-height: 52px;
    border-radius: 16px;
    font-size: 18px;
    box-shadow: 0 8px 20px rgba(38, 66, 158, 0.24);
  }

  .result-title {
    font-size: 34px;
  }

  .benefit-entry-btn {
    min-height: 48px;
    font-size: 15px;
    border-radius: 12px;
  }

  .benefit-hero-caption {
    font-size: 14px;
  }

  .benefit-type-thumb {
    width: 62px;
    height: 62px;
    border-radius: 14px;
  }

  .benefit-logo-wrap {
    border-radius: 14px;
    padding: 8px;
  }

  .benefit-logo {
    width: min(280px, 78vw);
  }

  .benefit-type-label {
    font-size: 14px;
  }

  .benefit-type-name {
    font-size: 24px;
  }

  .benefit-reason-card,
  .benefit-tip-card,
  .benefit-feature-card,
  .benefit-guide-card,
  .benefit-cta-card {
    border-radius: 16px;
    padding: 14px;
  }

  .benefit-reason-card h3,
  .benefit-guide-card h3 {
    font-size: 16px;
  }

  .benefit-reason-card p,
  .benefit-tip-card p,
  .benefit-feature-card p,
  .benefit-guide-card p,
  .benefit-cta-card p {
    font-size: 14px;
  }

  .benefit-feature-head h3 {
    font-size: 16px;
  }

  .benefit-feature-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .benefit-chip {
    grid-template-rows: auto auto;
    border-radius: 12px;
    font-size: 14px;
  }

  .benefit-chip span {
    min-height: 42px;
    padding: 8px 10px;
  }

  .benefit-feature-badge {
    font-size: 12px;
    padding: 3px 10px;
  }

  .benefit-guide-card p {
    padding: 14px;
  }

  .benefit-cta-card h3 {
    font-size: 20px;
  }

  .benefit-cta-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .benefit-store-btn {
    min-height: 56px;
    border-radius: 14px;
    font-size: 15px;
  }

  .benefit-store-btn img {
    width: 30px;
    height: 30px;
  }

  .icon-btn img {
    width: 18px;
    height: 18px;
  }

  .tips h3 {
    font-size: 24px;
  }

  .result-visual {
    height: clamp(300px, 40vh, 430px);
  }

  .answer-btn {
    border-radius: 16px;
    padding: 13px 14px;
    font-size: 14px;
    line-height: 1.3;
  }

  #progress-text {
    font-size: 22px;
  }

  .progress-track {
    height: 10px;
  }

  .question-label {
    font-size: 18px;
    padding: 5px 12px;
    border-radius: 10px;
    margin-top: 2px;
  }

  .question-title {
    font-size: 22px;
    line-height: 1.28;
    letter-spacing: -0.2px;
  }

  #question-screen .btn-ghost {
    min-height: 42px;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 17px;
    font-weight: 700;
    background: #e5eaf8;
    border: 1px solid transparent;
    color: #3f5ed9;
  }

  #question-screen.active {
    gap: 10px;
  }

  .answers {
    gap: 8px;
    margin-top: 4px;
  }

  .question-header {
    margin-bottom: 2px;
  }
}
