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

:root {
  --primary: #1a73e8;
  --primary-dark: #1558b0;
  --success: #34a853;
  --danger: #ea4335;
  --warning: #fbbc04;
  --bg: #f8f9fa;
  --card: #ffffff;
  --text: #202124;
  --text-muted: #5f6368;
  --border: #e0e0e0;
  --radius: 12px;
}

body {
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

header {
  background: var(--primary);
  color: #fff;
  padding: 20px 24px;
  text-align: center;
}
header h1 { font-size: 1.3rem; font-weight: 700; }
header p { font-size: 0.85rem; opacity: 0.9; margin-top: 4px; }

.container { max-width: 680px; margin: 0 auto; padding: 24px 16px; }

/* Form */
.form-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  margin-bottom: 24px;
}
.form-card h2 { font-size: 1rem; margin-bottom: 16px; color: var(--text); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color .2s;
}
.field input:focus { border-color: var(--primary); }
.field .hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.btn-submit:hover { background: var(--primary-dark); }
.btn-submit:disabled { background: #aaa; cursor: not-allowed; }

/* Loading */
#loading {
  display: none;
  text-align: center;
  padding: 48px 0;
}
.spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Results */
#results { display: none; }

.total-score-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.total-score-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.total-score-num {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
}
.total-score-num.high { color: var(--success); }
.total-score-num.mid  { color: var(--warning); }
.total-score-num.low  { color: var(--danger); }
.total-score-comment { font-size: 0.95rem; color: var(--text-muted); }

.section-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.section-score-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}
.section-score-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--primary);
  transition: width .6s ease;
}

.check-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.check-item:last-child { border-bottom: none; }
.check-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 1px;
}
.check-icon.ok { background: #e6f4ea; color: var(--success); }
.check-icon.ng { background: #fce8e6; color: var(--danger); }
.check-label { font-size: 0.9rem; font-weight: 600; }
.check-detail { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

/* MARUNAGE CTA */
.marunage-cta {
  background: linear-gradient(135deg, #00693e 0%, #00875a 60%, #00a86b 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px 24px;
  margin-top: 24px;
  text-align: center;
}
.marunage-cta .badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 100px;
  font-size: 0.75rem;
  padding: 4px 14px;
  margin-bottom: 16px;
  letter-spacing: .05em;
}
.marunage-cta h3 { font-size: 1.3rem; font-weight: 900; margin-bottom: 8px; line-height: 1.4; }
.marunage-cta .problem { font-size: 0.9rem; opacity: .9; margin-bottom: 20px; }
.marunage-cta .features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  text-align: left;
}
.marunage-cta .feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
}
.marunage-cta .feature-icon { font-size: 1.1rem; flex-shrink: 0; }

/* CTA button pulse animation */
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.5); }
  70%  { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.marunage-cta .cta-btn-wrap {
  margin-bottom: 10px;
}
.marunage-cta .cta-micro {
  font-size: 0.8rem;
  opacity: .85;
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.marunage-cta .cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 17px 16px;
  background: #fff;
  color: #00693e;
  font-weight: 900;
  font-size: 1.05rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  animation: pulse 2s infinite;
  transition: transform .15s, opacity .15s;
}
.marunage-cta .cta-btn:hover { transform: translateY(-2px); opacity: .95; }
.marunage-cta .cta-btn:active { transform: translateY(0); }
.marunage-cta .cta-btn .line-icon {
  width: 22px; height: 22px; flex-shrink: 0;
}
.marunage-cta .cta-note { font-size: 0.78rem; opacity: .7; margin-top: 10px; }

.retry-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  transition: all .2s;
}
.retry-btn:hover { background: var(--primary); color: #fff; }

.error-msg { color: var(--danger); font-size: 0.9rem; margin-top: 8px; }
