/* ══ エゴグラム簡易診断 フロントCSS ══════════════════════════ */
:root {
  --egq-bg:       #f7f8fa;
  --egq-white:    #ffffff;
  --egq-surface:  #f0f2f5;
  --egq-text:     #1a1a2e;
  --egq-muted:    #6b7280;
  --egq-border:   #e2e8f0;
  --egq-radius:   12px;
  --egq-accent:   #2563eb;
  --egq-gold:     #b7860d;
  --egq-cp: #C0392B; --egq-np: #1E8449; --egq-a: #1A5276;
  --egq-fc: #B7770D; --egq-ac: #6C3483;
  --egq-cp-bg: #FADBD8; --egq-np-bg: #D5F5E3; --egq-a-bg: #D6EAF8;
  --egq-fc-bg: #FDEBD0; --egq-ac-bg: #E8DAEF;
}

.egq-wrap {
  font-family: 'Hiragino Kaku Gothic ProN','Noto Sans JP','Yu Gothic UI',sans-serif;
  max-width: 620px;
  margin: 0 auto;
  padding: 8px 0;
  color: var(--egq-text);
}
.egq-screen { display: none; }
.egq-screen.egq-active { display: block; }

/* ── ボタン ─────────────────────────────────────────────── */
.egq-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 24px; border-radius: 8px; font-size: .9rem;
  font-weight: 600; cursor: pointer; border: 1.5px solid;
  transition: all .16s ease; letter-spacing: .02em;
}
.egq-btn-primary {
  background: var(--egq-accent); border-color: var(--egq-accent);
  color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.25);
}
.egq-btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; transform: translateY(-1px); }
.egq-btn-ghost {
  background: transparent; border-color: var(--egq-border);
  color: var(--egq-muted);
}
.egq-btn-ghost:hover { background: var(--egq-surface); color: var(--egq-text); }
.egq-btn:disabled { opacity: .35; cursor: default; pointer-events: none; }

/* ══ INTRO ══════════════════════════════════════════════ */
.egq-intro-box {
  background: var(--egq-white);
  border: 1px solid var(--egq-border);
  border-radius: 20px;
  padding: 44px 36px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
}
.egq-badge {
  display: inline-block;
  background: #eff6ff; color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 100px; padding: 4px 16px;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 18px;
}
.egq-intro-title {
  font-size: 2rem; font-weight: 800; line-height: 1.2;
  margin: 0 0 12px; color: var(--egq-text);
}
.egq-intro-title span {
  display: block;
  background: linear-gradient(90deg,#2563eb,#7c3aed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.egq-intro-sub { font-size: .88rem; color: var(--egq-muted); line-height: 1.8; margin: 0 0 24px; }

.egq-cat-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.egq-cat-pill {
  padding: 4px 14px; border-radius: 100px;
  font-size: .75rem; font-weight: 700; border: 1.5px solid;
}
.egq-cp { color: var(--egq-cp); border-color: var(--egq-cp); background: var(--egq-cp-bg); }
.egq-np { color: var(--egq-np); border-color: var(--egq-np); background: var(--egq-np-bg); }
.egq-a  { color: var(--egq-a);  border-color: var(--egq-a);  background: var(--egq-a-bg); }
.egq-fc { color: var(--egq-fc); border-color: var(--egq-fc); background: var(--egq-fc-bg); }
.egq-ac { color: var(--egq-ac); border-color: var(--egq-ac); background: var(--egq-ac-bg); }

.egq-guest-box { margin-bottom: 20px; }
.egq-guest-box label { display: block; font-size: .78rem; color: var(--egq-muted); margin-bottom: 7px; }
.egq-guest-box input {
  background: var(--egq-surface); border: 1.5px solid var(--egq-border);
  border-radius: 8px; padding: 10px 14px; font-size: .9rem;
  color: var(--egq-text); width: 260px; max-width: 100%;
  outline: none; transition: border-color .2s;
}
.egq-guest-box input:focus { border-color: var(--egq-accent); }
.egq-logged-msg { font-size: .82rem; color: var(--egq-muted); margin-bottom: 18px; }
.egq-logged-msg strong { color: var(--egq-accent); }

/* ══ QUIZ ════════════════════════════════════════════════ */
.egq-quiz-head { margin-bottom: 18px; }
.egq-prog-bar {
  height: 5px; background: var(--egq-border); border-radius: 100px;
  overflow: hidden; margin-bottom: 8px;
}
.egq-prog-fill {
  height: 100%; background: linear-gradient(90deg,#2563eb,#7c3aed);
  border-radius: 100px; transition: width .3s ease;
}
.egq-prog-info {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; color: var(--egq-muted);
}
.egq-cat-tag {
  font-size: .72rem; font-weight: 700;
  padding: 3px 11px; border-radius: 100px; border: 1.5px solid;
}

.egq-q-card {
  background: var(--egq-white);
  border: 1px solid var(--egq-border);
  border-radius: var(--egq-radius);
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  margin-bottom: 16px;
  animation: egq-in .2s ease;
}
@keyframes egq-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

.egq-q-num { font-size: .72rem; font-weight: 700; color: var(--egq-muted); letter-spacing: .1em; margin-bottom: 10px; }
.egq-q-text { font-size: 1.02rem; font-weight: 500; line-height: 1.7; margin: 0 0 22px; }

.egq-choices { display: flex; flex-direction: column; gap: 9px; }
.egq-choice {
  display: flex; align-items: center; gap: 12px;
  background: var(--egq-surface); border: 1.5px solid var(--egq-border);
  border-radius: 9px; padding: 11px 15px; cursor: pointer;
  text-align: left; color: var(--egq-text); font-size: .88rem;
  width: 100%; transition: all .13s ease;
}
.egq-choice:hover { border-color: var(--egq-accent); background: #eff6ff; }
.egq-choice.egq-sel { border-color: var(--egq-accent); background: #eff6ff; }

.egq-dot {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid var(--egq-border); flex-shrink: 0;
  transition: all .13s;
}
.egq-choice.egq-sel .egq-dot {
  background: var(--egq-accent); border-color: var(--egq-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.2);
}

.egq-quiz-nav { display: flex; align-items: center; }

/* ══ RESULT ══════════════════════════════════════════════ */
.egq-result-wrap {
  background: var(--egq-white);
  border: 1px solid var(--egq-border);
  border-radius: 20px;
  padding: 36px 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
}
.egq-result-head { text-align: center; margin-bottom: 24px; }
.egq-result-head h2 { font-size: 1.4rem; font-weight: 800; color: var(--egq-text); margin-bottom: 4px; }
.egq-result-date { font-size: .78rem; color: var(--egq-muted); margin-bottom: 10px; }
.egq-pattern-badge {
  display: inline-block; font-size: 1rem; font-weight: 700;
  padding: 6px 22px; border-radius: 100px; border: 2px solid;
  margin-top: 4px;
}

.egq-chart-wrap { display: flex; justify-content: center; margin-bottom: 20px; }
.egq-chart-wrap canvas { max-width: 260px; max-height: 260px; }

.egq-bars { display: flex; flex-direction: column; gap: 11px; margin-bottom: 24px; }
.egq-bar-row { display: grid; grid-template-columns: 120px 1fr 36px; align-items: center; gap: 10px; }
.egq-bar-label { font-size: .76rem; font-weight: 700; text-align: right; }
.egq-bar-track { height: 12px; background: var(--egq-border); border-radius: 100px; overflow: hidden; }
.egq-bar-fill { height: 100%; border-radius: 100px; transition: width .55s cubic-bezier(.4,0,.2,1); }
.egq-bar-val { font-size: .78rem; font-weight: 700; text-align: right; color: var(--egq-muted); }

.egq-desc-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.egq-desc-card {
  border-left: 4px solid; border-radius: 0 8px 8px 0;
  padding: 12px 14px;
}
.egq-desc-title { font-size: .84rem; font-weight: 700; margin-bottom: 4px; }
.egq-desc-body  { font-size: .78rem; color: var(--egq-muted); line-height: 1.65; }

.egq-summary {
  background: var(--egq-surface); border-radius: 10px;
  padding: 16px 18px; font-size: .85rem; line-height: 1.8;
  color: var(--egq-text); margin-bottom: 24px;
}
.egq-result-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* レスポンシブ */
@media (max-width: 480px) {
  .egq-intro-box, .egq-result-wrap { padding: 28px 16px; }
  .egq-q-card { padding: 22px 14px; }
  .egq-intro-title { font-size: 1.6rem; }
  .egq-bar-row { grid-template-columns: 90px 1fr 28px; }
}
