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

body {
  font-family: 'Pretendard', 'Apple SD Gothic Neo', -apple-system, sans-serif;
  background: linear-gradient(135deg, #ffeef8 0%, #fff5e6 50%, #f0f4ff 100%);
  min-height: 100vh;
  color: #2d2d2d;
  line-height: 1.6;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px;
}

header {
  text-align: center;
  margin-bottom: 32px;
}

h1 {
  font-size: 2rem;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #ff6b9d, #c44eff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: #888;
  font-size: 0.95rem;
}

form {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.person-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: grid;
  gap: 12px;
}

.person-card h2 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  color: #555;
}

label.radio-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
label.radio-group input { margin-right: 4px; margin-left: 12px; }

input, select {
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fafafa;
}

input:focus, select:focus {
  outline: none;
  border-color: #ff6b9d;
  background: white;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

button {
  padding: 12px 24px;
  border: none;
  border-radius: 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s, box-shadow 0.2s;
}

button.primary {
  background: linear-gradient(90deg, #ff6b9d, #c44eff);
  color: white;
  box-shadow: 0 4px 16px rgba(255,107,157,0.3);
  flex: 1;
}

button.secondary {
  background: white;
  color: #555;
  border: 1px solid #ddd;
}

button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }

#result {
  background: white;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-top: 8px;
}

.hidden { display: none; }

.saju-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: #faf7ff;
  border-radius: 12px;
  font-size: 0.85rem;
}

.saju-box div { color: #666; }
.saju-box strong { color: #c44eff; font-size: 1rem; }

.title-line {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  color: #2d2d2d;
}

.score-line {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 24px;
  background: linear-gradient(90deg, #ff6b9d, #c44eff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section { margin-bottom: 20px; }

.section h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #f0e8ff;
}

.section ul { list-style: none; padding-left: 0; }
.section li {
  padding: 8px 0 8px 24px;
  position: relative;
  font-size: 0.95rem;
  color: #444;
}
.section li:before {
  content: "💕";
  position: absolute;
  left: 0;
}

.section.warn li:before { content: "⚠️"; }

.tip-box {
  background: linear-gradient(135deg, #fff5e6, #ffeef8);
  padding: 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.7;
}
.tip-box p { margin-bottom: 10px; }
.tip-box p:last-child { margin-bottom: 0; }

.info-stack {
  display: grid;
  gap: 10px;
}

.info-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 0.92rem;
  color: #444;
}

.info-row .label {
  font-weight: 600;
  color: #c44eff;
}

.fortune-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.fortune-person {
  background: #faf7ff;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #f0e8ff;
}

.fortune-head {
  font-weight: 700;
  font-size: 0.95rem;
  color: #c44eff;
  margin-bottom: 8px;
}
.fortune-head small {
  color: #888;
  font-weight: 400;
  font-size: 0.78rem;
}

.fortune-summary {
  font-size: 0.88rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
  line-height: 1.5;
}

.fortune-detail {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.65;
}

.overall-line {
  margin-top: 8px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #ffeef8, #fff5e6);
  border-left: 3px solid #c44eff;
  border-radius: 6px;
  font-size: 0.92rem;
  color: #444;
  line-height: 1.65;
}

.overall-line.action-line {
  background: #faf7ff;
  border-left-color: #ff6b9d;
  margin-top: 6px;
}

.year-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.year-chip {
  background: linear-gradient(90deg, #ffeef8, #fff5e6);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #c44eff;
  border: 1px solid #f0d4ff;
}
.year-chip small {
  color: #888;
  font-weight: 400;
}

.hint {
  font-size: 0.82rem;
  color: #999;
  margin-top: 6px;
  font-style: italic;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: #f5f0ff;
  color: #6a3d8e;
  padding: 8px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  border: 1px solid #ebe0fa;
}

.chip.food {
  background: #fff5e6;
  color: #b56a1f;
  border-color: #ffe0c0;
}

.color-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.color-item {
  text-align: center;
  padding: 16px 10px;
  background: #faf7ff;
  border-radius: 12px;
  border: 1px solid #f0e8ff;
}

.color-item.highlight {
  background: linear-gradient(135deg, #ffeef8, #fff5e6);
  border-color: #ffc0e0;
}

.color-label {
  font-size: 0.78rem;
  color: #888;
  margin-bottom: 6px;
}

.color-name {
  font-size: 1.0rem;
  font-weight: 700;
  color: #c44eff;
  line-height: 1.3;
}

.color-item.highlight .color-name {
  background: linear-gradient(90deg, #ff6b9d, #c44eff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

footer {
  text-align: center;
  margin-top: 32px;
  color: #aaa;
}

.notice-box {
  background: linear-gradient(135deg, #fffbe6, #fff5e6);
  border: 1px solid #ffe0a0;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.85rem;
  color: #6b5520;
  line-height: 1.6;
  margin-bottom: 16px;
}

.consent-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.82rem;
  color: #555;
  background: #faf7ff;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #f0e8ff;
  cursor: pointer;
}

.consent-row input {
  margin-top: 3px;
  flex-shrink: 0;
  width: auto;
  accent-color: #c44eff;
}

.consent-row a {
  color: #c44eff;
  text-decoration: underline;
}

.result-disclaimer {
  background: #fff5e6;
  border-left: 3px solid #ffa940;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #7a5a20;
  margin-bottom: 16px;
  line-height: 1.5;
}

.footer-disclaimer {
  background: #faf7ff;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.78rem;
  color: #888;
  line-height: 1.6;
  margin-bottom: 12px;
  text-align: left;
}

.footer-disclaimer strong {
  color: #c44eff;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.footer-links a {
  color: #888;
  text-decoration: none;
}

.footer-links a:hover {
  color: #c44eff;
  text-decoration: underline;
}

.footer-links span {
  color: #ccc;
}

/* ==================== 법적 페이지 (privacy / terms) ==================== */

.container.legal {
  max-width: 720px;
}

.legal-doc {
  background: white;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  font-size: 0.92rem;
  color: #333;
  line-height: 1.75;
}

.legal-doc .lead {
  background: #faf7ff;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 24px;
}

.legal-doc h2 {
  font-size: 1.05rem;
  margin-top: 28px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #f0e8ff;
  color: #2d2d2d;
}

.legal-doc h2:first-child {
  margin-top: 0;
}

.legal-doc ul {
  padding-left: 22px;
  margin: 8px 0;
}

.legal-doc li {
  margin-bottom: 6px;
}

.legal-doc p {
  margin-bottom: 10px;
}

.legal-doc code {
  background: #f5f0ff;
  color: #6a3d8e;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

.highlight-box {
  background: linear-gradient(135deg, #ffeef8, #fff5e6);
  border-left: 4px solid #c44eff;
  padding: 14px 16px;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 0.92rem;
}

.highlight-box.warning {
  background: linear-gradient(135deg, #fffbe6, #fff5e6);
  border-left-color: #ff9500;
}

.highlight-box p {
  margin-bottom: 8px;
}

.highlight-box p:last-child {
  margin-bottom: 0;
}

.legal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 4px;
}

.back-link {
  color: #c44eff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }
  .saju-box { grid-template-columns: 1fr; }
  .info-row { grid-template-columns: 1fr; gap: 4px; }
  .color-grid { grid-template-columns: 1fr; }
  .fortune-card { grid-template-columns: 1fr; }
}
