:root {
  --primary: #3157ff;
  --primary-dark: #1f3fd1;
  --lime: #c9ff32;
  --ink: #17191f;
  --muted: #6e7480;
  --line: #e5e8ef;
  --surface: #ffffff;
  --background: #f5f7fb;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 5%, rgba(49, 87, 255, 0.09), transparent 25rem),
    radial-gradient(circle at 90% 90%, rgba(201, 255, 50, 0.13), transparent 26rem),
    var(--background);
  font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  word-break: keep-all;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

button,
a[href] {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.playground {
  width: min(100%, 1080px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 28px 64px;
}

.playground-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  border-bottom: 1px solid rgba(23, 25, 31, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 6px 15px rgba(49, 87, 255, 0.28);
  font-size: 15px;
  font-weight: 900;
}

.header-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.screen {
  animation: screen-in 0.35s ease both;
}

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

.intro {
  padding: 68px 0 38px;
  text-align: center;
}

.eyebrow,
.question-number,
.result-label {
  display: block;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.intro h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.2;
}

.intro p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 20px;
}

.game-card {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 16px 45px rgba(30, 42, 79, 0.07);
}

.game-card-featured {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  gap: 14px 26px;
}

.game-card-featured:after {
  position: absolute;
  right: -70px;
  bottom: -95px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(49, 87, 255, 0.06);
  content: "";
}

.game-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 22px;
}

.phone-icon {
  background: #e7edff;
}

.phone-icon:before {
  width: 36px;
  height: 58px;
  border: 4px solid var(--primary);
  border-radius: 10px;
  background: #fff;
  content: "";
}

.phone-icon span {
  position: absolute;
  bottom: 18px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.coming-icon {
  color: #b5bac5;
  background: #f2f3f6;
  font-size: 34px;
  font-weight: 300;
}

.game-card-copy {
  position: relative;
  z-index: 1;
}

.game-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 8px;
  border-radius: 6px;
  color: #fff;
  background: var(--primary);
  font-size: 10px;
  font-weight: 900;
}

.game-badge.muted {
  color: #7f8590;
  background: #eef0f4;
}

.game-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.35;
}

.game-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.game-card .primary-button {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  justify-self: start;
}

.game-card-coming {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.game-card-coming .game-icon {
  margin-bottom: 24px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 22px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(49, 87, 255, 0.2);
}

.primary-button:hover {
  background: var(--primary-dark);
  box-shadow: 0 13px 27px rgba(49, 87, 255, 0.28);
  transform: translateY(-2px);
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.secondary-button:hover {
  background: #f4f6fa;
  transform: translateY(-2px);
}

.notice {
  margin: 48px 0 0;
  color: #8a909b;
  font-size: 11px;
  text-align: center;
}

.quiz-screen,
.result-screen {
  width: min(100%, 720px);
  margin: 0 auto;
  padding-top: 58px;
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.text-button {
  padding: 4px 0;
  color: var(--muted);
  background: none;
  cursor: pointer;
}

.text-button:hover {
  color: var(--ink);
}

.progress-track {
  overflow: hidden;
  width: 100%;
  height: 7px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: #e5e8f1;
}

.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #788fff);
  transition: width 0.35s ease;
}

.quiz-panel,
.result-card {
  padding: clamp(28px, 6vw, 52px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(30, 42, 79, 0.08);
}

.quiz-panel h1,
.result-card h1 {
  margin: 0;
  font-size: clamp(25px, 5vw, 34px);
  line-height: 1.4;
}

#question-description {
  margin: 12px 0 30px;
  color: var(--muted);
  font-size: 14px;
}

.answer-list {
  display: grid;
  gap: 12px;
}

.answer-button {
  display: flex;
  width: 100%;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.answer-button:after {
  color: #a6abb5;
  content: "→";
}

.answer-button:hover,
.answer-button:focus-visible {
  border-color: var(--primary);
  background: #f3f6ff;
  outline: none;
  transform: translateX(3px);
}

.result-screen {
  padding-bottom: 30px;
  text-align: center;
}

.result-emoji {
  display: grid;
  width: 90px;
  height: 90px;
  margin: 0 auto 22px;
  place-items: center;
  border-radius: 28px;
  background: #edf1ff;
  font-size: 46px;
}

.result-summary {
  max-width: 520px;
  margin: 14px auto 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.result-keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-bottom: 30px;
}

.result-keywords span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #edf1ff;
  font-size: 12px;
  font-weight: 800;
}

.recommendation {
  padding: 24px;
  border-radius: 18px;
  background: #f6f8fc;
  text-align: left;
}

.recommendation > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.recommendation strong {
  display: block;
  font-size: 20px;
}

.recommendation p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 720px) {
  .playground {
    padding: 0 18px 40px;
  }

  .playground-header {
    height: 64px;
  }

  .intro {
    padding: 46px 0 28px;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: 0;
    padding: 26px;
    border-radius: 20px;
  }

  .game-card-featured {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 18px;
  }

  .game-icon {
    width: 66px;
    height: 66px;
    border-radius: 18px;
  }

  .phone-icon:before {
    width: 29px;
    height: 47px;
    border-width: 3px;
  }

  .phone-icon span {
    bottom: 14px;
  }

  .game-card h2 {
    font-size: 20px;
  }

  .game-card-featured .game-card-copy p {
    margin-left: -86px;
    padding-top: 8px;
  }

  .game-card .primary-button {
    width: 100%;
    justify-self: stretch;
  }

  .quiz-screen,
  .result-screen {
    padding-top: 34px;
  }

  .quiz-panel,
  .result-card {
    border-radius: 20px;
  }

  .answer-button {
    min-height: 61px;
    font-size: 14px;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .game-card-featured {
    grid-template-columns: 1fr;
  }

  .game-card-featured .game-card-copy p {
    margin-left: 0;
  }
}

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