:root {
  --navy: #1f2a44;
  --navy-light: #324565;
  --ink: #22304d;
  --muted: #5f6c85;
  --bg: #f5f7fb;
  --white: #ffffff;
  --accent: #e6ecf5;
  --shadow: 0 18px 40px rgba(31, 42, 68, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 32px;
  max-width: 920px;
  margin: 0 auto;
}

.app-header {
  text-align: center;
  margin-bottom: 20px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--navy);
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 12px;
}

h1 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--navy);
  line-height: 1.3;
  word-break: keep-all;
  overflow-wrap: anywhere;
}@media (max-width: 480px) {
  h1 {
    font-size: 18px;
  }
  .subtitle {
    font-size: 12px;
  }
}

.subtitle {
  margin: 0 auto;
  max-width: 580px;
  color: var(--muted);
  font-size: 14px;
}

.subtitle-line {
  display: inline;
}

.card {
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.fade {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

h2 {
  margin-top: 0;
  color: var(--navy);
  font-size: 20px;
}

.lead {
  color: var(--ink);
  font-size: 15px;
}

.meta {
  margin: 16px 0 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.btn {
  text-decoration: none;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: 0.2s ease;
}

.btn.primary {
  background: var(--navy);
  color: var(--white);
}

.btn.primary:hover {
  background: var(--navy-light);
}

.btn.outline {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--navy);
}

.btn.outline:hover {
  background: var(--accent);
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--accent);
}

.progress {
  width: 100%;
  height: 8px;
  background: var(--accent);
  border-radius: 999px;
  margin-bottom: 18px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--navy);
  width: 0;
  transition: width 0.3s ease;
}

.question {
  margin-bottom: 20px;
}

.question-count {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

h3 {
  margin: 0;
  font-size: 18px;
}

.options {
  display: grid;
  gap: 12px;
}

.option-btn {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--white);
  text-align: left;
  font-size: 15px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
}

.option-btn:hover {
  border-color: var(--navy);
  background: #f0f3fa;
}

.result {
  background: var(--bg);
  border-radius: 16px;
  padding: 18px;
  margin-top: 18px;
}

.result h3 {
  font-size: 18px;
  margin-top: 0;
}

.result .section-title {
  font-weight: 600;
  color: var(--navy);
  margin-top: 16px;
}

.cta {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--accent);
}

.cta-text {
  font-size: 14px;
  color: var(--muted);
}

.app-footer {
  margin-top: auto;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding-top: 16px;
}

@media (max-width: 640px) {
  h1 {
    font-size: 18px;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }
  .subtitle {
    font-size: 12px;
  }
  .subtitle-line {
    display: block;
  }
}

@media (min-width: 720px) {
  .app {
    padding: 32px 24px 40px;
  }
  h1 {
    font-size: 28px;
  }
  .card {
    padding: 32px;
  }
  .button-group {
    flex-direction: row;
  }
}
