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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  background: #F5F8FA;
  color: #1a1a1a;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
}

.container { width: 100%; max-width: 640px; }

/* Header */
.header {
  background: #003669;
  border-radius: 12px 12px 0 0;
  padding: 22px 28px 20px;
  border-bottom: 4px solid #C8932A;
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-logo {
  flex-shrink: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
  overflow: hidden;
}
.header-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.header-content { flex: 1; min-width: 0; }
.header-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: #C8932A; margin-bottom: 4px;
}
.header-title { font-size: 20px; font-weight: 600; color: #fff; margin-bottom: 4px; line-height: 1.25; }
.header-sub { font-size: 13px; color: #9AABB8; }

/* Card */
.card {
  background: #fff;
  border-radius: 0 0 12px 12px;
  border: 1px solid #E0E8F0;
  border-top: none;
  padding: 28px;
}

/* Intro view */
.intro-lead { font-size: 15px; color: #3D3D3A; line-height: 1.6; margin-bottom: 20px; }
.intro-lead strong { color: #003669; }

.dim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
@media (max-width: 520px) { .dim-grid { grid-template-columns: 1fr; } }
.dim-card {
  border: 1px solid #E0E8F0; border-radius: 10px;
  padding: 16px 18px;
  border-top: 3px solid #003669;
}
.dim-card.gold { border-top-color: #C8932A; }
.dim-card-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: #9AABB8; margin-bottom: 4px;
}
.dim-card-name { font-size: 15px; font-weight: 600; color: #003669; margin-bottom: 6px; }
.dim-card.gold .dim-card-name { color: #C8932A; }
.dim-card-text { font-size: 13px; color: #5A7A96; line-height: 1.55; }

.name-block { margin-bottom: 20px; }
.name-label { display: block; font-size: 12px; font-weight: 600; color: #5A7A96; margin-bottom: 6px; }
.name-input {
  width: 100%; padding: 11px 14px;
  border: 1px solid #D4E7F9; border-radius: 8px;
  font-size: 14px; color: #1a1a1a; background: #fff; font-family: inherit;
  outline: none; transition: border-color 0.15s;
}
.name-input:focus { border-color: #003669; }
.privacy { font-size: 12px; color: #9AABB8; margin-top: 14px; line-height: 1.5; }

/* Progress */
.progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.progress-bar { flex: 1; height: 4px; background: #EBF4FC; border-radius: 2px; }
.progress-fill { height: 4px; background: #003669; border-radius: 2px; transition: width 0.4s ease; }
.progress-label { font-size: 12px; color: #9AABB8; white-space: nowrap; }

/* Area badge */
.area-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #EBF4FC; border-radius: 6px;
  padding: 4px 10px; margin-bottom: 14px;
  font-size: 12px; font-weight: 600; color: #003669; letter-spacing: 0.04em;
}
.area-dot { width: 8px; height: 8px; border-radius: 50%; background: #C8932A; flex-shrink: 0; }
.area-badge.gold .area-dot { background: #C8932A; }
.area-badge.navy .area-dot { background: #003669; }

/* Question */
.question-text { font-size: 17px; font-weight: 500; color: #1a1a1a; line-height: 1.55; margin-bottom: 20px; }

/* Scale */
.scale-row { display: flex; gap: 8px; margin-bottom: 8px; }
.scale-btn {
  flex: 1; padding: 12px 4px;
  border: 1px solid #D4E7F9; border-radius: 8px; background: #fff;
  font-size: 15px; font-weight: 500; color: #5A7A96;
  cursor: pointer; text-align: center; transition: all 0.15s; font-family: inherit;
}
.scale-btn:hover { background: #EBF4FC; border-color: #9AABB8; }
.scale-btn.selected { background: #003669; border-color: #003669; color: #fff; }
.scale-anchors { display: flex; justify-content: space-between; font-size: 12px; color: #9AABB8; margin-bottom: 22px; }

/* Navigation */
.nav-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.btn-back {
  padding: 10px 18px; background: transparent; border: 1px solid #D4E7F9;
  border-radius: 8px; font-size: 14px; color: #5A7A96; cursor: pointer;
  transition: all 0.15s; font-family: inherit;
}
.btn-back:hover { background: #F5F8FA; }
.btn-back:disabled { opacity: 0; pointer-events: none; }
.btn-next, .btn-primary {
  padding: 10px 24px; background: #003669; border: none;
  border-radius: 8px; font-size: 14px; font-weight: 500; color: #fff;
  cursor: pointer; transition: opacity 0.15s; font-family: inherit;
}
.btn-next:hover, .btn-primary:hover { opacity: 0.88; }
.btn-primary { padding: 11px 26px; font-size: 15px; }

/* Views */
#quiz-view, #result-view { display: none; }
#intro-view { display: block; }

.result-header { margin-bottom: 18px; }
.result-title { font-size: 22px; font-weight: 600; color: #003669; margin-bottom: 4px; }
.result-sub { font-size: 14px; color: #5A7A96; }

/* Status banner */
.status-banner { border-radius: 10px; padding: 20px 22px; color: #fff; margin-bottom: 20px; }
.sb-score { font-size: 30px; font-weight: 600; line-height: 1; }
.sb-score .unit { font-size: 16px; font-weight: 500; opacity: 0.85; }
.sb-status { font-size: 18px; font-weight: 600; margin-top: 6px; }
.sb-desc { font-size: 14px; opacity: 0.95; line-height: 1.55; margin-top: 8px; }

.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: #9AABB8; margin: 6px 0 10px;
}

/* Dimension result cards */
.area-card { border: 1px solid #E0E8F0; border-radius: 10px; padding: 16px 18px; margin-bottom: 10px; background: #fff; }
.area-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; gap: 12px; }
.area-card-name { font-size: 14px; font-weight: 600; color: #003669; }
.area-card.gold .area-card-name { color: #C8932A; }
.area-card-score { font-size: 22px; font-weight: 600; white-space: nowrap; }
.area-card-score .unit { font-size: 14px; color: #9AABB8; font-weight: 500; }
.bar-bg { height: 5px; background: #EBF4FC; border-radius: 3px; margin-bottom: 10px; }
.bar-fill { height: 5px; border-radius: 3px; width: 0; transition: width 0.8s ease; }
.area-card-note { font-size: 13px; color: #5A7A96; line-height: 1.55; }

/* Focus box */
.focus-box { background: #F5F8FA; border-radius: 10px; padding: 18px 20px; margin: 18px 0; border-left: 3px solid #C8932A; }
.focus-eyebrow { font-size: 11px; font-weight: 600; color: #C8932A; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 6px; }
.focus-name { font-size: 16px; font-weight: 600; color: #003669; margin-bottom: 8px; }
.focus-desc { font-size: 14px; color: #3D3D3A; line-height: 1.6; }
.focus-desc + .focus-desc { margin-top: 10px; }

/* CTA */
.cta-box { background: #003669; border-radius: 10px; padding: 24px; margin-top: 20px; text-align: center; }
.cta-title { font-size: 17px; font-weight: 600; color: #C8932A; margin-bottom: 8px; }
.cta-text { font-size: 13px; color: #D4E7F9; line-height: 1.6; margin-bottom: 16px; }
.cta-steps { display: flex; justify-content: center; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.cta-step { font-size: 13px; color: #9AABB8; display: flex; align-items: center; gap: 6px; }
.cta-step-dot { width: 6px; height: 6px; border-radius: 50%; background: #C8932A; }
.cta-link {
  display: inline-block; padding: 10px 22px; background: #C8932A; color: #fff;
  border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none;
  cursor: pointer; border: none; transition: opacity 0.15s; font-family: inherit;
}
.cta-link:hover { opacity: 0.88; }

/* Footer */
.footer { text-align: center; margin-top: 20px; font-size: 12px; color: #9AABB8; }
.footer .src { font-size: 11px; line-height: 1.5; max-width: 540px; margin: 8px auto 0; }
.footer .restart {
  background: none; border: none; cursor: pointer; color: #5A7A96;
  font-size: 12px; text-decoration: underline; font-family: inherit; margin-top: 12px;
}

@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
.shake { animation: shake 0.3s ease; }
