:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1a1f2e;
  --muted: #6b7280;
  --border: #e6e8ef;
  --accent: #4f46e5;
  --accent-soft: #eef0fe;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20,25,45,.06), 0 8px 24px rgba(20,25,45,.05);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Noto Sans JP", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.site-header { padding: 18px 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 800; font-size: 1.15rem; letter-spacing: .02em; }
.logo span { color: var(--accent); }
.tag { color: var(--muted); font-size: .8rem; }

.hero { text-align: center; padding: 56px 0 32px; }
.hero h1 { font-size: 1.9rem; font-weight: 800; line-height: 1.4; margin: 0 0 14px; }
.hero h1 .hl { color: var(--accent); }
.hero p { color: var(--muted); margin: 0 auto; max-width: 520px; }
.badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.badge { background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 5px 14px; font-size: .8rem; font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 8px; }
.field .hint { color: var(--muted); font-size: .78rem; font-weight: 400; margin-left: 6px; }
.seg { display: flex; gap: 10px; }
.seg label {
  flex: 1; text-align: center; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px; cursor: pointer; font-weight: 600; transition: .15s; margin: 0;
}
.seg input { display: none; }
.seg input:checked + span { color: var(--accent); }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
textarea, input[type=text] {
  width: 100%; border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 14px;
  font-family: inherit; font-size: .95rem; color: var(--text); resize: vertical; background: #fcfcfe;
}
textarea:focus, input:focus { outline: none; border-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 14px 24px; font-size: 1rem; font-weight: 700; cursor: pointer; width: 100%;
  font-family: inherit; transition: .15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }

/* chat */
.chat { padding: 24px 0 140px; }
.progress { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--muted); font-size: .85rem; }
.progress-bar { flex: 1; height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.bubble { max-width: 82%; padding: 14px 18px; border-radius: 16px; margin-bottom: 14px; white-space: pre-wrap; word-break: break-word; }
.bubble.interviewer { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble.student { background: var(--accent); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.who { font-size: .72rem; color: var(--muted); margin: 0 0 4px 6px; font-weight: 600; }
.composer { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 14px 0; }
.composer .wrap { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { flex: 1; max-height: 140px; }
.composer .btn { width: auto; padding: 12px 22px; }
.typing { color: var(--muted); font-size: .85rem; padding: 4px 6px 16px; }

/* result */
.score-hero { text-align: center; padding: 28px; }
.score-total { font-size: 3.4rem; font-weight: 800; line-height: 1; }
.score-total small { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.grade { display: inline-block; font-size: 1.4rem; font-weight: 800; padding: 4px 20px; border-radius: 99px; margin-top: 10px; }
.axes { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.axis { }
.axis-top { display: flex; justify-content: space-between; font-size: .88rem; font-weight: 600; margin-bottom: 5px; }
.axis-bar { height: 9px; background: var(--border); border-radius: 99px; overflow: hidden; }
.axis-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.sec { margin-top: 22px; }
.sec h3 { font-size: 1rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.sec ul { margin: 0; padding-left: 20px; }
.sec li { margin-bottom: 7px; }
.ma { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.ma .q { font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.ma .a { color: var(--text); font-size: .9rem; background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; }
.center { text-align: center; }
.loading { text-align: center; padding: 80px 20px; color: var(--muted); }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.site-footer { text-align: center; color: var(--muted); font-size: .78rem; padding: 40px 0; }

/* Google ログインボタン / 区切り */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px;
  background: #fff; color: #1f2937; border: 1.5px solid #d1d5db; border-radius: 10px; font-weight: 700; font-size: .95rem;
  text-decoration: none; transition: .15s; margin-bottom: 14px; }
.btn-google:hover { background: #f9fafb; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; margin: 4px 0 16px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
