:root {
  --bg: #f7f8fb;
  --card: #ffffff;
  --ink: #1a1f36;
  --muted: #6b7280;
  --brand: #3454d1;
  --brand-dark: #263da0;
  --ai: #e02424;
  --mixed: #f5a623;
  --human: #21a67a;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(26, 31, 54, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; display: flex; align-items: baseline; gap: 8px; }
.brand-sub { font-size: 12px; font-weight: 500; color: var(--muted); }
.nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 14px; }
.nav a:hover { color: var(--brand); }

/* Hero */
.hero { text-align: center; padding: 48px 0 24px; }
.hero h1 { font-size: 30px; margin: 0 0 12px; letter-spacing: -0.01em; }
.lead { color: var(--muted); font-size: 16px; margin: 0 0 28px; }

.checker {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: left;
}
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  outline: none;
}
textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(52,84,209,0.12); }
.checker-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.char-count { color: var(--muted); font-size: 13px; }

.btn-primary {
  background: var(--brand); color: #fff; border: none; border-radius: 10px;
  padding: 11px 28px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .15s ease;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-secondary {
  background: #fff; color: var(--brand); border: 1.5px solid var(--brand);
  border-radius: 10px; padding: 10px 22px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-secondary:hover { background: rgba(52,84,209,0.06); }
.btn-ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 14px; font-size: 13px; cursor: pointer; margin-top: 10px;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.error { color: var(--ai); font-size: 14px; margin: 12px 0 0; }

/* Result */
.result { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin: 24px 0; }
.result-head { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.gauge { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.gauge svg { width: 140px; height: 140px; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: var(--border); stroke-width: 10; }
.gauge-fg { fill: none; stroke: var(--human); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .6s ease, stroke .6s ease; }
.gauge-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; }
.gauge-num .pct { font-size: 16px; margin-left: 2px; color: var(--muted); }

.result-meta { flex: 1; min-width: 220px; }
.meta-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.meta-label { width: 92px; color: var(--muted); font-size: 14px; }
.meta-val { font-weight: 600; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: var(--mixed); }
.confidence { font-weight: 600; }

/* Sentences */
.sentences { margin-top: 24px; }
.sentences h3, .hints h3 { font-size: 16px; margin: 0 0 12px; }
.sentence-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sentence-list li { font-size: 14px; }
.sentence-bar { height: 6px; border-radius: 3px; background: var(--border); margin-top: 3px; overflow: hidden; }
.sentence-bar > span { display: block; height: 100%; border-radius: 3px; }
.sentence-text { color: var(--ink); }
.sentence-score { color: var(--muted); font-size: 12px; margin-left: 6px; }

/* Hints */
.hints { margin-top: 22px; background: #f3f6ff; border: 1px solid #dbe3ff; border-radius: 10px; padding: 16px 18px; }
.hints ul { margin: 0; padding-left: 20px; }
.hints li { margin-bottom: 6px; font-size: 14px; }

/* Sections */
.how, .cta { margin: 36px 0; }
.how h2, .cta h2 { font-size: 22px; }
.how ol { color: var(--ink); padding-left: 22px; }
.how li { margin-bottom: 8px; }

.cta { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; text-align: center; box-shadow: var(--shadow); }
.cta p { color: var(--muted); max-width: 560px; margin: 0 auto 16px; }
.thanks { display: block; color: var(--human); font-weight: 600; margin-top: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; margin-top: 40px; text-align: center; }
.site-footer p { margin: 4px 0; font-size: 13px; color: var(--muted); }
.site-footer .muted { opacity: .7; }

@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
  .result-head { gap: 16px; }
  .gauge { width: 120px; height: 120px; }
  .gauge svg { width: 120px; height: 120px; }
}
