/* candidate.json의 theme로 :root 변수 주입 */
:root {
  --primary: #E03131;
  --bg: #FFFFFF;
  --text: #000000;
  --answer-bg: #F5F5F5;
  --placeholder: #999999;
  --border-radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.page {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  text-align: center;
}

.photo {
  width: 200px;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 0 auto 24px;
  object-fit: cover;
  background: #f0f0f0;
}

.title {
  font-size: 60px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  word-break: keep-all;
}

.search-form {
  margin-bottom: 12px;
}

.search-input {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  font-family: inherit;
  font-weight: 500;
  border: 2px solid var(--primary);
  border-radius: var(--border-radius);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: box-shadow 0.15s;
}
.search-input::placeholder { color: var(--placeholder); }
.search-input:focus { box-shadow: 0 0 0 3px rgba(224, 49, 49, 0.15); }
.search-input:disabled { opacity: 0.6; cursor: progress; }

.subtitle {
  margin: 14px 0 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.answer-box {
  margin-top: 24px;
  padding: 20px 22px;
  background: var(--answer-bg);
  border-radius: var(--border-radius);
  text-align: left;
}

.answer-text {
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: keep-all;
  min-height: 1.7em;
}

.answer-text .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--text);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.matched-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.matched-tags .tag {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 600;
}

@media (max-width: 480px) {
  .photo { width: 160px; }
  .title { font-size: 44px; }
  .search-input { font-size: 16px; padding: 14px; }
}
