:root {
  --bg: #fff4f7;
  --card: #ffffff;
  --ink: #2b2b3a;
  --soft: #77778a;
  --line: #f0e4ea;
  --pink: #ff8fb1;
  --pink-deep: #e85d8a;
  --sky: #cfe8ff;
  --mint: #d4f5dd;
  --butter: #ffebc2;
  --lilac: #e6dbff;
  --radius: 22px;
  --radius-sm: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 10% 0%, var(--lilac) 0, transparent 40%),
                    radial-gradient(circle at 100% 30%, var(--sky) 0, transparent 35%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  word-break: keep-all;
}
.wrap { max-width: 480px; margin: 0 auto; padding: 20px 16px 8px; display: flex; flex-direction: column; gap: 14px; }
.foot { max-width: 480px; margin: 0 auto; padding: 16px 16px 28px; text-align: center; color: var(--soft); font-size: 12px; }

.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: 0 6px 20px rgba(232, 93, 138, .08); }
.h1 { font-size: 26px; line-height: 1.3; margin: 4px 0 6px; }
.h2 { font-size: 18px; margin: 0 0 10px; }
.lead { margin: 0; font-size: 15px; }
.small { font-size: 13px; margin: 4px 0; }
.muted { color: var(--soft); font-weight: normal; }
.error { background: #ffe3e8; color: #b3264f; border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 12px; font-size: 14px; }

.hero { text-align: center; padding: 18px 8px 4px; }
.logo { display: inline-block; background: var(--card); border-radius: 999px; padding: 6px 16px; font-weight: 700; color: var(--pink-deep); box-shadow: 0 4px 12px rgba(232, 93, 138, .12); }

.form .field { display: block; margin-bottom: 18px; }
.label { display: block; font-weight: 700; margin-bottom: 8px; }
.input { width: 100%; font-size: 17px; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fffafc; color: var(--ink); outline: none; }
.input:focus { border-color: var(--pink); }

.themes { display: flex; gap: 8px; flex-wrap: wrap; }
.theme { flex: 1 1 0; min-width: 90px; }
.theme input { position: absolute; opacity: 0; pointer-events: none; }
.theme span { display: block; text-align: center; padding: 12px 6px; border-radius: 999px; border: 2px solid var(--line); background: #fffafc; font-weight: 700; font-size: 15px; cursor: pointer; }
.theme input:checked + span { background: var(--pink); border-color: var(--pink); color: #fff; }
.theme input:focus-visible + span { outline: 3px solid var(--sky); }
.theme input:disabled + span { opacity: .4; }

.count-out { color: var(--pink-deep); font-size: 20px; }
.range { width: 100%; accent-color: var(--pink-deep); height: 28px; }
.range-ends { display: flex; justify-content: space-between; }

.btn { display: block; width: 100%; text-align: center; text-decoration: none; border: 0; border-radius: 999px; font-weight: 700; font-size: 17px; padding: 14px 18px; cursor: pointer; font-family: inherit; }
.btn.big { padding: 17px 20px; font-size: 18px; }
.btn.primary { background: var(--pink-deep); color: #fff; box-shadow: 0 6px 0 #c94676; }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 3px 0 #c94676; }
.btn.secondary { background: var(--sky); color: #1d4f86; }
.btn.ghost { background: var(--card); color: var(--pink-deep); border: 2px solid var(--pink); }
.btn[disabled] { opacity: .6; }

.ad { border: 2px dashed #d9c6cf; border-radius: var(--radius-sm); color: #b9a4ae; text-align: center; padding: 22px 0; font-size: 13px; background: rgba(255, 255, 255, .5); }

/* questions */
.intro-mini .title-mini { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.progress { height: 10px; border-radius: 999px; background: #fff; overflow: hidden; }
.progress .bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), var(--pink-deep)); border-radius: 999px; transition: width .25s; }
.progress-text { text-align: right; margin-top: -6px; }
.ask { text-align: center; font-weight: 700; color: var(--pink-deep); margin: 0; }
.q { border: 0; margin: 0 0 14px; padding: 20px; background: var(--card); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(232, 93, 138, .08); min-width: 0; }
.qtitle { font-size: 21px; font-weight: 700; padding: 0; margin-bottom: 14px; float: left; width: 100%; }
.qnum { color: var(--pink-deep); }
.opts { clear: both; display: flex; flex-direction: column; gap: 10px; }
.opt { display: block; position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .ment, .opt .otext { display: block; }
.opt { padding: 14px 18px; border-radius: 18px; border: 2px solid var(--line); background: #fffafc; }
.opt .ment { font-weight: 700; font-size: 17px; }
.opt .otext { font-size: 13px; color: var(--soft); margin-top: 2px; }
.opt:has(input:checked) { border-color: var(--pink-deep); background: #ffe8f0; }
.opt:has(input:focus-visible) { outline: 3px solid var(--sky); }
.opt:active { transform: scale(.98); }

/* JS step mode: one question at a time */
.js .quiz-form .step { display: none; }
.js .quiz-form .step.active { display: block; }
.js .quiz-form .submit-row { display: none; }
.js .quiz-form .submit-row.show { display: block; }
.js .challenge .steps-area { display: none; }
.js .challenge.started .steps-area { display: flex; flex-direction: column; gap: 14px; }
.js .challenge.started .step-intro { display: none; }
.step-intro { display: flex; flex-direction: column; gap: 14px; }
.steps-area { display: flex; flex-direction: column; gap: 14px; }
.quiz-form { display: flex; flex-direction: column; gap: 14px; }

/* board */
.rows { list-style: none; padding: 0; margin: 0; }
.row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed var(--line); }
.row:last-child { border-bottom: 0; }
.row.me { background: #fff1d6; border-radius: 12px; padding-left: 8px; }
.rank { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--lilac); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.row:nth-child(1) .rank { background: #ffd66b; }
.nick { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pts { font-weight: 700; color: var(--pink-deep); }
.tag { font-style: normal; font-size: 11px; background: var(--pink); color: #fff; border-radius: 999px; padding: 1px 7px; vertical-align: 2px; }
.empty { color: var(--soft); margin: 0; font-size: 14px; }
.missed { background: var(--butter); }
.missed-q { font-weight: 700; margin: 2px 0 0; font-size: 17px; }

/* share */
.share .link-box { margin: 12px 0; }
.input.link { font-size: 14px; }
.share-btns { display: flex; flex-direction: column; gap: 10px; }
.copied { color: #2f8a52; text-align: center; font-weight: 700; }

/* result capture: dense so 10 rows fit one phone screen */
.capture { padding: 16px 16px 12px; }
.cap-head { text-align: center; padding-bottom: 10px; border-bottom: 2px dashed var(--line); margin-bottom: 8px; }
.cap-title { font-size: 20px; font-weight: 800; margin: 0; }
.cap-meta { margin: 4px 0 0; font-size: 15px; }
.cap-meta .score { color: var(--pink-deep); font-size: 20px; }
.label-chip { display: inline-block; background: var(--mint); color: #22744a; border-radius: 999px; padding: 1px 10px; font-weight: 700; font-size: 14px; }
.cap-sub { font-size: 13px; margin: 6px 0 4px; color: var(--soft); }
.answers { list-style: none; padding: 0; margin: 0; }
.ans { display: flex; align-items: baseline; gap: 4px; padding: 5px 0; border-bottom: 1px solid #f7eef2; font-size: 15px; line-height: 1.35; white-space: nowrap; overflow: hidden; }
.ans:last-child { border-bottom: 0; }
.anum { font-size: 12px; color: var(--soft); flex: none; }
.aq { font-size: 12px; color: var(--soft); flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; min-width: 2em; }
.adash { font-size: 12px; color: #c8b7bf; flex: none; }
.aa { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; min-width: 3em; }
.cap-repeat { font-size: 11px; color: var(--soft); text-align: center; padding: 8px 0 4px; border-top: 2px dashed var(--line); margin-top: 4px; }
.cap-foot { text-align: center; margin: 8px 0 0; font-size: 11px; }

.message { text-align: center; }
.emoji-big { font-size: 44px; margin: 0; }
.quiz-head { text-align: center; }
