/* ===== Base ===== */
:root {
  --main: #E8B4B8;
  --main-dark: #D4949A;
  --sub: #F5E6E0;
  --text: #4A4A4A;
  --text-light: #7A7A7A;
  --bg: #FFFAF7;
  --white: #FFFFFF;
  --border: #E8D8D2;
  --success: #8CB4A0;
  --warning: #E8C87A;
  --danger: #D4949A;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--main-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Stemar Notice ===== */
.stemar-notice {
  background: var(--sub);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
  padding: 6px 16px;
  letter-spacing: 0.04em;
}

/* ===== Header ===== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--main-dark);
  letter-spacing: 0.04em;
}

.site-logo span {
  font-weight: 300;
  font-size: 0.7rem;
  display: block;
  color: var(--text-light);
}

.header-nav a {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-left: 16px;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 48px 20px 32px;
  background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
}

.hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 12px;
  color: var(--text);
}

.hero h1 em {
  font-style: normal;
  color: var(--main-dark);
}

.hero p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.btn-start {
  display: inline-block;
  background: var(--main);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 48px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(232, 180, 184, 0.4);
  transition: all 0.2s;
  letter-spacing: 0.04em;
}

.btn-start:hover {
  background: var(--main-dark);
  transform: translateY(-1px);
  text-decoration: none;
}

.hero-note {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 12px;
}

/* ===== Quiz ===== */
.quiz-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 60px;
  display: none;
}

.quiz-section.active {
  display: block;
}

/* Progress */
.progress-wrap {
  margin-bottom: 32px;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 8px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--main);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Question Card */
.question-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  text-align: center;
  animation: fadeInUp 0.35s ease;
}

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

.question-number {
  font-size: 0.8rem;
  color: var(--main-dark);
  font-weight: 700;
  margin-bottom: 8px;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.7;
  margin-bottom: 28px;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-btn {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.answer-btn:hover {
  border-color: var(--main);
  background: var(--sub);
}

.answer-btn:active {
  transform: scale(0.98);
}

/* ===== Result ===== */
.result-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 60px;
  display: none;
}

.result-section.active {
  display: block;
}

.result-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 24px;
  text-align: center;
  margin-bottom: 24px;
  animation: fadeInUp 0.4s ease;
}

.result-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.result-level {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-level.level-mild {
  color: var(--success);
}

.result-level.level-moderate {
  color: var(--warning);
}

.result-level.level-severe {
  color: var(--danger);
}

.result-score {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.result-meter {
  width: 100%;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 24px;
}

.result-meter-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s ease;
}

.result-meter-fill.level-mild {
  background: var(--success);
}

.result-meter-fill.level-moderate {
  background: var(--warning);
}

.result-meter-fill.level-severe {
  background: var(--danger);
}

.result-message {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
}

/* Recommendations */
.recommend-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  margin-bottom: 24px;
}

.recommend-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.recommend-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
}

.recommend-item:last-child {
  margin-bottom: 0;
}

.recommend-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--main-dark);
}

.recommend-item p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* Email Form */
.email-card {
  background: var(--sub);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 24px;
  text-align: center;
}

.email-card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.email-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.email-form {
  display: flex;
  gap: 8px;
}

.email-form input {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
}

.email-form input:focus {
  border-color: var(--main);
}

.email-form button {
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  background: var(--main);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.email-form button:hover {
  background: var(--main-dark);
}

.email-thanks {
  display: none;
  font-size: 0.9rem;
  color: var(--success);
  font-weight: 700;
}

/* Share */
.share-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}

.share-card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.share-btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  background: #1DA1F2;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.share-btn:hover {
  opacity: 0.85;
  text-decoration: none;
  color: var(--white);
}

/* Notice Box */
.notice-box {
  background: var(--sub);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.7;
  text-align: center;
}

.notice-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 0.85rem;
}

/* Retry */
.retry-wrap {
  text-align: center;
  margin-bottom: 40px;
}

.btn-retry {
  display: inline-block;
  padding: 14px 40px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  border: 2px solid var(--main);
  border-radius: 50px;
  background: var(--white);
  color: var(--main-dark);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-retry:hover {
  background: var(--main);
  color: var(--white);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
}

.footer-links {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0 10px;
}

.footer-copy {
  font-size: 0.7rem;
  color: var(--text-light);
}

/* ===== Sub Pages ===== */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.page-content h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.page-content h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--sub);
}

.page-content p,
.page-content li {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.page-content ul {
  padding-left: 1.4em;
}

/* ===== Responsive ===== */
@media (min-width: 600px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .question-card {
    padding: 40px 36px;
  }

  .email-form {
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 399px) {
  .email-form {
    flex-direction: column;
  }

  .email-form button {
    width: 100%;
  }

  .header-nav a {
    margin-left: 10px;
    font-size: 0.75rem;
  }
}
