/* StarCharted — 경량 모바일 우선 스타일 (프레임워크 없음) */
:root {
  --bg: #0d1026;
  --bg-card: #171b3a;
  --bg-input: #10142e;
  --border: #2c3160;
  --text: #e8e9f4;
  --text-dim: #9ea3c9;
  --gold: #e5b95c;
  --gold-dim: #b08d3f;
  --accent: #7f8cff;
  --danger: #ff7a7a;
  --radius: 12px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 760px; margin: 0 auto; padding: 0 1rem; }

/* ---------- header/footer ---------- */
header.site {
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
}
header.site .container {
  display: flex; align-items: center; justify-content: space-between;
}
.logo { font-weight: 700; font-size: 1.15rem; color: var(--gold); letter-spacing: 0.02em; }
.logo span { color: var(--text); }
nav.main a { color: var(--text-dim); margin-left: 1rem; font-size: 0.95rem; }
nav.main a:hover { color: var(--gold); text-decoration: none; }

footer.site {
  border-top: 1px solid var(--border);
  margin-top: 4rem; padding: 1.5rem 0 2.5rem;
  color: var(--text-dim); font-size: 0.85rem; text-align: center;
}

/* ---------- typography ---------- */
h1 { font-size: 1.7rem; line-height: 1.25; margin: 1.6rem 0 0.8rem; }
h2 { font-size: 1.25rem; margin: 1.6rem 0 0.6rem; color: var(--gold); }
p.lede { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 1rem; }
.badge {
  display: inline-block; font-size: 0.78rem; color: var(--gold-dim);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 0.2rem 0.7rem; margin: 0.4rem 0 1rem;
}

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: 0.8rem; grid-template-columns: 1fr; margin: 1.2rem 0; }
@media (min-width: 560px) { .grid { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem; display: block;
  color: var(--text);
}
.card:hover { border-color: var(--gold-dim); text-decoration: none; }
.card h3 { font-size: 1.02rem; margin-bottom: 0.25rem; color: var(--gold); }
.card p { font-size: 0.88rem; color: var(--text-dim); }

/* ---------- forms ---------- */
form.calc {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem; margin: 1.4rem 0;
}
form.calc fieldset { border: 0; margin: 0 0 0.6rem; }
form.calc legend {
  color: var(--gold); font-weight: 600; margin-bottom: 0.5rem; font-size: 1rem;
}
.field { margin-bottom: 0.9rem; }
.field label {
  display: block; font-size: 0.86rem; color: var(--text-dim); margin-bottom: 0.3rem;
}
.field input, .field select {
  width: 100%; padding: 0.6rem 0.7rem;
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; font-size: 1rem;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field .hint { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.25rem; }
.row2 { display: grid; gap: 0.8rem; grid-template-columns: 1fr 1fr; }

button.cta {
  width: 100%; padding: 0.85rem; font-size: 1.05rem; font-weight: 700;
  background: var(--gold); color: #1a1503; border: 0; border-radius: 8px;
  cursor: pointer;
}
button.cta:hover { background: #f0ca74; }
button.cta:disabled { opacity: 0.6; cursor: wait; }

.form-error {
  display: none; color: var(--danger); font-size: 0.9rem;
  margin-top: 0.7rem; white-space: pre-line;
}
.form-error.show { display: block; }

/* ---------- result page ---------- */
.big3 { display: grid; gap: 0.8rem; grid-template-columns: 1fr; margin: 1.2rem 0; }
@media (min-width: 560px) { .big3 { grid-template-columns: repeat(3, 1fr); } }
.big3 .item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; text-align: center;
}
.big3 .item .k { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.big3 .item .v { font-size: 1.3rem; font-weight: 700; color: var(--gold); margin-top: 0.2rem; }

table.planets { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.92rem; }
table.planets th, table.planets td {
  padding: 0.5rem 0.6rem; text-align: left; border-bottom: 1px solid var(--border);
}
table.planets th { color: var(--text-dim); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }
.retro { color: var(--danger); font-size: 0.8rem; }

.pillars { display: grid; gap: 0.8rem; grid-template-columns: repeat(2, 1fr); margin: 1.2rem 0; }
@media (min-width: 560px) { .pillars { grid-template-columns: repeat(4, 1fr); } }
.pillars .item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem; text-align: center;
}
.pillars .item .k { font-size: 0.78rem; color: var(--text-dim); }
.pillars .item .stem { font-weight: 700; color: var(--gold); margin-top: 0.2rem; }
.pillars .item .branch { font-size: 0.9rem; color: var(--text); }

.score-ring {
  font-size: 3rem; font-weight: 800; color: var(--gold); text-align: center;
  margin: 1rem 0 0.2rem;
}
.score-label { text-align: center; color: var(--text-dim); margin-bottom: 1rem; }

.summary {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem; margin: 1.4rem 0;
}
.summary h2 { margin-top: 0.2rem; }
.summary ul { padding-left: 1.2rem; }

.share-box {
  display: flex; gap: 0.6rem; margin: 1rem 0;
}
.share-box input {
  flex: 1; padding: 0.55rem 0.7rem; background: var(--bg-input);
  color: var(--text-dim); border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.85rem;
}
.share-box button {
  padding: 0.55rem 1rem; background: var(--bg-card); color: var(--gold);
  border: 1px solid var(--gold-dim); border-radius: 8px; cursor: pointer;
}

.pro-box {
  border: 1px solid var(--gold-dim); border-radius: var(--radius);
  padding: 1.2rem; margin: 1.6rem 0; text-align: center;
  background: linear-gradient(160deg, #1d1a35, #171b3a);
}
.pro-box .price { color: var(--gold); font-weight: 800; font-size: 1.2rem; }
.pro-box .note { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.5rem; }

/* ---------- FAQ ---------- */
.faq { margin: 1.6rem 0; }
.faq details {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0.7rem 0.9rem; margin-bottom: 0.6rem; background: var(--bg-card);
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: 0.5rem; color: var(--text-dim); font-size: 0.92rem; }
