* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #eee; color: #222;
  font-family: "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
.w {
  max-width: 480px; min-height: 100vh; margin: 0 auto; background: #fff;
  padding: 20px 18px 120px;
}
h1 { font-size: 21px; margin: 4px 0 8px; line-height: 1.35; }
h2 { font-size: 16px; margin: 22px 0 8px; }
h2 small { font-weight: normal; font-size: 12px; }
.sub { color: #777; font-size: 13px; margin: 0 0 14px; }
.muted { color: #888; }
.small { font-size: 12px; }
.center { text-align: center; }
.pad { padding: 40px 0; }
.card { background: #f6f8fb; border-radius: 12px; padding: 12px; margin: 8px 0; font-size: 14px; line-height: 1.6; }

/* 누구 */
.who-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: #f6f8fb; border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-bottom: 8px;
}
.link { background: none; border: 0; color: #3b6cf6; font-size: 13px; padding: 4px; text-decoration: underline; cursor: pointer; }
.roster { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.roster button {
  padding: 14px 8px; border: 1.5px solid #dfe5ef; background: #fff; border-radius: 12px;
  font-size: 15px; color: #222; cursor: pointer;
}
.roster button:active { background: #eef3ff; border-color: #3b6cf6; }
.typed summary { color: #3b6cf6; font-size: 14px; cursor: pointer; padding: 6px 0; }
.typed-form { display: flex; gap: 8px; margin-top: 8px; }
.typed-form input {
  flex: 1; min-width: 0; font-size: 16px; padding: 12px; border: 1.5px solid #dfe5ef; border-radius: 10px;
}
.btn-sm { border: 0; background: #3b6cf6; color: #fff; font-weight: bold; border-radius: 10px; padding: 0 14px; font-size: 15px; }

/* 칩 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid #dfe5ef; background: #fff; color: #444; border-radius: 999px;
  padding: 8px 14px; font-size: 14px; cursor: pointer; line-height: 1.2;
}
.chip[aria-checked="true"], .chip[aria-pressed="true"] {
  background: #3b6cf6; border-color: #3b6cf6; color: #fff; font-weight: bold;
}
.chip:disabled { opacity: .6; }

/* 촬영 안내 */
.guide { background: #fff8e1; border: 2px solid #ffb300; border-radius: 12px; padding: 10px 12px; margin: 18px 0 0; }
.guide summary { font-weight: bold; font-size: 15px; cursor: pointer; }
.guide ul { padding-left: 18px; font-size: 14px; line-height: 1.7; margin: 8px 0; }
.ex { display: flex; gap: 6px; }
.ex div { flex: 1; text-align: center; font-size: 12px; }
.ok { color: #1a8f3c; font-weight: bold; }
.no { color: #d32f2f; font-weight: bold; }

/* 큰 버튼 */
.pick { display: flex; flex-direction: column; gap: 10px; margin: 24px 0 8px; }
.big-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 64px; border-radius: 14px; font-size: 18px; font-weight: bold;
  border: 2px solid #3b6cf6; color: #3b6cf6; background: #fff; cursor: pointer;
}
.big-btn.primary { background: #3b6cf6; color: #fff; }
.big-btn input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.pick.compact { flex-direction: row; }
.pick.compact .big-btn { flex: 1; min-height: 48px; font-size: 15px; }

/* 썸네일 */
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.thumb { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: #f0f2f5; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 12px; color: #888; }
.thumb .del {
  position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 16px; line-height: 28px; padding: 0; cursor: pointer;
}
.thumb .st {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 12px; color: #fff;
  background: rgba(0,0,0,.55); text-align: center;
}
.thumb .st.ok { background: rgba(26,143,60,.85); }
.thumb .st.fail { background: rgba(211,47,47,.9); }
.thumb .mini { position: absolute; left: 0; bottom: 0; height: 3px; background: #ffb300; transition: width .2s; }
.thumb .retry {
  display: block; margin: 4px auto 0; border: 0; border-radius: 6px; background: #fff; color: #d32f2f;
  font-weight: bold; font-size: 12px; padding: 4px 8px; cursor: pointer;
}

/* 진행 막대 */
.progress { margin: 16px 0 4px; }
.bar { height: 10px; border-radius: 5px; background: #e6ebf3; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: #3b6cf6; transition: width .25s; }

/* 완료 */
.done { text-align: center; padding: 48px 0 24px; }
.done-icon { font-size: 56px; }
.done h1 { font-size: 23px; }

.privacy { color: #888; font-size: 12px; text-align: center; margin-top: 28px; }

/* 아래 고정 버튼 */
.bottom {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: #fff; box-shadow: 0 -2px 8px #0001;
}
#main-btn {
  width: 100%; padding: 15px; border: 0; border-radius: 12px; background: #3b6cf6; color: #fff;
  font-size: 17px; font-weight: bold; cursor: pointer;
}
#main-btn:disabled { background: #a9bdf7; }
.center-link { display: block; margin: 6px auto 0; }
