/* ============================================================
   style.css — 7 Roles 진단 / 현장 집계 공용 스타일
   팔레트: 딥네이비 #0A1B33, 보조 #13294B, 강조 골드 #C9A24B(밝은 변형 #E0C079),
           밝은 면 #F5F2EA. 강조색은 골드 하나뿐입니다.
   ============================================================ */

/* 사용자 PC에 설치된 Freesentation 7 Bold 를 그대로 씁니다.
   폰트 파일을 서버에 올리지 않으므로, 설치되지 않은 관람자에게는 아래 폴백이 보입니다.
   font-weight 를 주지 않습니다 — 폰트 자체가 Bold 웨이트라 이중볼드가 됩니다. */
@font-face {
  font-family: 'FS7';
  src: local('Freesentation 7 Bold'), local('Freesentation-7Bold');
}

:root {
  --navy: #0A1B33;
  --navy-2: #13294B;
  --gold: #C9A24B;
  --gold-light: #E0C079;
  --cream: #F5F2EA;
  --font: 'FS7', -apple-system, 'Malgun Gothic', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--font);
  font-weight: 400;              /* 이중볼드 방지 */
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, strong, b, th {
  font-weight: 400;              /* 브라우저 기본 bold 해제 */
  margin: 0;
}

button {
  font-family: var(--font);
  font-weight: 400;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--gold); }

/* ===================== 모바일 진단 (index.html) ===================== */

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 16px calc(20px + env(safe-area-inset-bottom));
}

.screen { display: none; flex: 1; flex-direction: column; }
.screen.is-active { display: flex; }

/* --- 진행 막대 --- */
.progress {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--navy);
  padding: 14px 0 10px;
}
.progress-bar {
  height: 3px;
  background: rgba(245, 242, 234, 0.12);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width 260ms ease-out;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(245, 242, 234, 0.55);
  letter-spacing: 0.02em;
}
.progress-meta .role-now { color: var(--gold); }

/* --- 인트로 --- */
.intro { justify-content: center; text-align: left; padding: 40px 0; gap: 18px; }
.intro .eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
}
.intro h1 { font-size: 30px; line-height: 1.35; }
.intro h1 .accent { color: var(--gold); }
.intro p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(245, 242, 234, 0.72);
}
.intro .rule {
  border-left: 2px solid var(--gold);
  padding: 10px 0 10px 14px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(245, 242, 234, 0.86);
  background: var(--navy-2);
  border-radius: 0 6px 6px 0;
}
.role-list { list-style: none; margin: 4px 0 0; padding: 0; }
.role-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 7px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(245, 242, 234, 0.07);
}
.role-list .num { color: var(--gold); min-width: 18px; font-size: 13px; }
.role-list .ko { color: rgba(245, 242, 234, 0.5); font-size: 12.5px; margin-left: auto; }

.btn-primary {
  margin-top: 8px;
  width: 100%;
  padding: 17px 20px;
  border: none;
  border-radius: 10px;
  background: var(--gold);
  color: var(--navy);
  font-size: 17px;
  letter-spacing: 0.01em;
}
.btn-primary:active { background: var(--gold-light); }

/* --- 문항 카드 --- */
.q-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 6px 0 0; }
.q-role {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 10px;
}
.q-prefix {
  display: inline-block;
  align-self: flex-start;   /* flex 컬럼 안에서 가로로 늘어나지 않게 */
  font-size: 12px;
  color: var(--navy);
  background: var(--gold-light);
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.q-text {
  font-size: 19px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  min-height: 3.1em;
}

.scale { display: flex; flex-direction: column; gap: 8px; }
.scale-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(245, 242, 234, 0.14);
  border-radius: 10px;
  background: var(--navy-2);
  color: var(--cream);
  font-size: 15.5px;
  text-align: left;
  transition: border-color 140ms, background 140ms;
}
.scale-btn .dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 242, 234, 0.35);
  flex: 0 0 auto;
}
.scale-btn.is-picked { border-color: var(--gold); background: rgba(201, 162, 75, 0.14); }
.scale-btn.is-picked .dot { border-color: var(--gold); background: var(--gold); }
.scale-btn:active { border-color: var(--gold); }

.q-nav { margin-top: 18px; display: flex; }
.btn-ghost {
  padding: 10px 2px;
  border: none;
  background: none;
  color: rgba(245, 242, 234, 0.5);
  font-size: 14px;
}
.btn-ghost[disabled] { opacity: 0.25; cursor: default; }

/* --- 결과 --- */
.result { padding: 26px 0 0; gap: 0; }
.stage-card {
  background: var(--navy-2);
  border: 1px solid rgba(201, 162, 75, 0.28);
  border-radius: 14px;
  padding: 22px 20px;
  text-align: center;
}
.stage-card .label { font-size: 12px; letter-spacing: 0.2em; color: rgba(245, 242, 234, 0.55); }
.stage-card .big {
  font-size: 54px;
  line-height: 1.15;
  color: var(--gold);
  margin: 6px 0 2px;
  letter-spacing: -0.02em;
}
.stage-card .big .unit { font-size: 20px; color: var(--gold-light); margin-left: 2px; }
.stage-card .name { font-size: 20px; margin-bottom: 8px; }
.stage-card .desc { font-size: 13.5px; line-height: 1.6; color: rgba(245, 242, 234, 0.62); }
.stage-card .total { margin-top: 12px; font-size: 12px; color: rgba(245, 242, 234, 0.4); }

/* 4개 구간 기준을 결과 화면에도 그대로 보여 줍니다. 지금 구간만 골드. */
.stage-card .stage-bands {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin: 16px auto 0;
  max-width: 300px;
  text-align: left;
}
.stage-card .band {
  display: flex; gap: 6px; align-items: baseline;
  font-size: 12px; color: rgba(245, 242, 234, 0.32);
}
.stage-card .band.is-on { color: var(--gold); }
.stage-card .band .band-code { min-width: 20px; }

.section-title {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin: 30px 0 4px;
}
.section-sub { font-size: 13px; color: rgba(245, 242, 234, 0.55); line-height: 1.6; }

.radar-box { margin: 4px -8px 0; }
.radar-svg { width: 100%; height: auto; display: block; }

.rx-item {
  background: var(--navy-2);
  border-left: 2px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 14px 16px;
  margin-top: 10px;
}
.rx-item .rx-role { font-size: 14px; color: var(--gold-light); margin-bottom: 6px; }
.rx-item .rx-role .score { color: rgba(245, 242, 234, 0.45); font-size: 12px; margin-left: 6px; }
.rx-item .rx-text { font-size: 14px; line-height: 1.65; color: rgba(245, 242, 234, 0.88); }

.score-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5px; }
.score-table td { padding: 9px 0; border-bottom: 1px solid rgba(245, 242, 234, 0.07); vertical-align: middle; }
.score-table td:last-child { text-align: right; color: var(--gold); width: 52px; font-size: 15px; }
.score-table .rname { display: block; color: rgba(245, 242, 234, 0.82); }
.score-table .rko { display: block; color: rgba(245, 242, 234, 0.38); font-size: 12px; margin-top: 2px; }
.score-table tr.is-low .rname { color: var(--gold-light); }
.score-table tr.is-low td:last-child { color: var(--gold-light); }

.privacy-note {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(245, 242, 234, 0.1);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(245, 242, 234, 0.45);
}
.ebook-line { margin-top: 12px; font-size: 12.5px; color: rgba(245, 242, 234, 0.5); }
.ebook-line a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(201, 162, 75, 0.4); }

.submit-state { margin-top: 18px; font-size: 12.5px; color: rgba(245, 242, 234, 0.45); text-align: center; }
.submit-state.is-error { color: var(--gold-light); }

/* ===================== 현장 집계 (live.html) ===================== */

.live {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 2.2vh 3vw;
  background:
    radial-gradient(120% 80% at 50% 0%, #13294B 0%, #0A1B33 62%);
}

.live-head { display: flex; align-items: baseline; justify-content: space-between; }
.live-head .title { font-size: 2.1vh; letter-spacing: 0.24em; color: var(--gold); }
.live-head .sub { font-size: 1.7vh; color: rgba(245, 242, 234, 0.45); }

/* 가운데 레이더는 높이로 크기가 정해지고, 남는 폭을 양옆 칼럼이 나눠 씁니다. */
.live-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.6vw;
  min-height: 0;
}

.live-col { display: flex; flex-direction: column; gap: 3vh; min-width: 0; }

.metric { }
.metric .metric-label { font-size: 1.7vh; letter-spacing: 0.18em; color: rgba(245, 242, 234, 0.5); margin-bottom: 0.6vh; }
.metric .metric-value { font-size: 11vh; line-height: 1; color: var(--cream); letter-spacing: -0.02em; }
.metric .metric-value.gold { color: var(--gold); }
.metric .metric-unit { font-size: 3vh; color: rgba(245, 242, 234, 0.45); margin-left: 0.6vh; }
.metric .metric-note { font-size: 1.7vh; color: rgba(245, 242, 234, 0.5); margin-top: 0.8vh; line-height: 1.5; }

.live-radar { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 0; }
.live-radar .radar-svg { height: 74vh; width: auto; margin: 0 auto; }

.weak-card {
  border: 1px solid rgba(201, 162, 75, 0.35);
  background: rgba(19, 41, 75, 0.7);
  border-radius: 1.2vh;
  padding: 2.4vh 2vh;
}
.weak-card .weak-label { font-size: 1.6vh; letter-spacing: 0.18em; color: rgba(245, 242, 234, 0.5); }
.weak-card .weak-num {
  font-size: 9vh;
  line-height: 1.05;
  color: var(--gold);
  margin: 0.4vh 0;
}
.weak-card .weak-name { font-size: 3vh; color: var(--gold-light); line-height: 1.25; }
.weak-card .weak-ko { font-size: 1.9vh; color: rgba(245, 242, 234, 0.6); margin-top: 0.6vh; }
.weak-card .weak-score { font-size: 1.8vh; color: rgba(245, 242, 234, 0.45); margin-top: 1.2vh; }

.live .stage-bands { display: flex; flex-direction: column; gap: 0.7vh; margin-top: 0.8vh; }
.live .stage-bands .band {
  display: flex; align-items: baseline; gap: 0.8vh;
  font-size: 1.6vh; color: rgba(245, 242, 234, 0.34);
}
.live .stage-bands .band.is-on { color: var(--gold); }
.live .stage-bands .band .band-code { min-width: 3.4vh; }

.live-empty {
  text-align: center;
  font-size: 2.4vh;
  color: rgba(245, 242, 234, 0.4);
  line-height: 1.8;
}

.live-foot {
  position: fixed;
  right: 1.4vw; bottom: 1.2vh;
  font-size: 1.4vh;
  color: rgba(245, 242, 234, 0.18);
}
.live-foot button {
  border: none; background: none; color: inherit; font-size: inherit;
  padding: 0.4vh 0.8vh; margin-left: 0.8vh;
  border-left: 1px solid rgba(245, 242, 234, 0.15);
}
.live-foot button:hover { color: rgba(245, 242, 234, 0.5); }
