:root {
  --bg: #fbfaf7;
  --bg-alt: #f2f0ea;
  --card: #ffffff;
  --fg: #1c1b19;
  --muted: #66635c;
  --line: #e3e0d8;
  --accent: #1f6f5c;
  --accent-fg: #ffffff;
  --accent-soft: #e3f1ec;
  --high: #b3261e;
  --high-soft: #fbe9e7;
  --mid: #a15c00;
  --mid-soft: #fdf1df;
  --low: #3c5a99;
  --low-soft: #e8eef9;
  --mark: #fff0a8;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141412;
    --bg-alt: #1b1b18;
    --card: #1f1f1c;
    --fg: #ecebe6;
    --muted: #a19e95;
    --line: #2f2e2a;
    --accent: #5cc2a6;
    --accent-fg: #0f2a23;
    --accent-soft: #183129;
    --high: #f28b82;
    --high-soft: #3a1d1b;
    --mid: #f0b25a;
    --mid-soft: #362814;
    --low: #9db7ec;
    --low-soft: #1c2638;
    --mark: #5a4b00;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #141412; --bg-alt: #1b1b18; --card: #1f1f1c; --fg: #ecebe6; --muted: #a19e95; --line: #2f2e2a;
  --accent: #5cc2a6; --accent-fg: #0f2a23; --accent-soft: #183129; --high: #f28b82; --high-soft: #3a1d1b;
  --mid: #f0b25a; --mid-soft: #362814; --low: #9db7ec; --low-soft: #1c2638; --mark: #5a4b00; --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.8 "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  font-feature-settings: "palt";
}
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { font-weight: 700; letter-spacing: 0.02em; color: var(--fg); text-decoration: none; font-size: 18px; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 18px; align-items: center; font-size: 14px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--fg); }
@media (max-width: 720px) { .nav .hide-sm { display: none; } }
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 32px 0 48px; font-size: 13px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.site-footer a { color: var(--muted); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform 0.08s ease, opacity 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* hero */
.hero { padding: 72px 0 56px; }
.eyebrow { font-size: 13px; color: var(--accent); font-weight: 600; letter-spacing: 0.06em; }
.hero h1 { font-size: clamp(30px, 5.2vw, 48px); line-height: 1.35; margin: 12px 0 18px; letter-spacing: 0.01em; }
.hero p.lead { font-size: 17px; color: var(--muted); max-width: 640px; margin: 0 0 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fineprint { font-size: 12px; color: var(--muted); margin-top: 14px; }

section { padding: 56px 0; }
section.alt { background: var(--bg-alt); }
h2.section-title { font-size: clamp(22px, 3.4vw, 30px); line-height: 1.45; margin: 0 0 8px; }
p.section-lead { color: var(--muted); margin: 0 0 32px; }

.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { font-size: 17px; margin: 0 0 8px; line-height: 1.5; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; margin-bottom: 10px; }

/* demo */
.demo { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .demo { grid-template-columns: 1fr; } }
.demo-input { font-size: 15px; white-space: pre-wrap; }
.label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; margin-bottom: 8px; display: block; }
mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 3px; }

/* findings */
.finding { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--card); margin-bottom: 10px; }
.finding-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.phrase { font-weight: 700; }
.badge { font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 999px; white-space: nowrap; }
.badge.high { background: var(--high-soft); color: var(--high); }
.badge.medium { background: var(--mid-soft); color: var(--mid); }
.badge.low { background: var(--low-soft); color: var(--low); }
.finding p { margin: 4px 0; font-size: 14px; }
.finding .rewrite { background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.finding .basis { font-size: 12px; color: var(--muted); margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.finding .basis a { color: var(--muted); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); border-width: 2px; }
.plan .tag { font-size: 12px; color: var(--accent); font-weight: 700; min-height: 20px; }
.plan .name { font-size: 20px; font-weight: 700; margin: 2px 0; }
.plan .for { font-size: 13px; color: var(--muted); }
.plan .price { font-size: 32px; font-weight: 700; margin: 14px 0 0; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 14px; font-weight: 400; color: var(--muted); }
.plan .early { font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; font-size: 14px; flex: 1; }
.plan li { padding: 6px 0 6px 22px; position: relative; border-bottom: 1px solid var(--line); }
.plan li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.notice { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 18px 20px; font-size: 14px; margin-top: 20px; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }

/* faq */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font-size: 20px; color: var(--muted); }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 10px 0 0; font-size: 15px; }

/* disclaimer */
.disclaimer { font-size: 13px; color: var(--muted); border-left: 3px solid var(--line); padding: 8px 12px; margin: 16px 0; background: var(--card); border-radius: 0 8px 8px 0; }

/* forms */
input[type="email"], input[type="text"], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--fg); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
}
textarea { min-height: 200px; resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.check input { margin-top: 5px; }
.msg { font-size: 14px; margin-top: 10px; }
.msg.err { color: var(--high); }
.msg.ok { color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--card); }
.seg label { padding: 6px 14px; border-radius: 999px; font-size: 14px; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { color: var(--accent-fg); }
.seg label:has(input:checked) { background: var(--accent); color: var(--accent-fg); }

/* modal */
dialog { border: none; border-radius: 16px; padding: 0; width: min(480px, calc(100vw - 32px)); background: var(--card); color: var(--fg); box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.dialog-body { padding: 24px; }
.dialog-body h3 { margin: 0 0 6px; font-size: 19px; }

/* legal pages */
.legal { padding: 48px 0; }
.legal h1 { font-size: 26px; margin: 0 0 6px; }
.legal h2 { font-size: 18px; margin: 32px 0 8px; }
.legal p, .legal li { font-size: 15px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; }
.legal th, .legal td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal th { width: 32%; background: var(--bg-alt); font-weight: 600; }
@media (max-width: 600px) { .legal th, .legal td { display: block; width: 100%; } .legal th { border-bottom: none; } }
.blank { color: var(--high); }

/* app */
.app-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; padding: 32px 0; }
@media (max-width: 860px) { .app-layout { grid-template-columns: 1fr; } }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.counter { font-size: 12px; color: var(--muted); text-align: right; }
.overall { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.empty { color: var(--muted); font-size: 14px; text-align: center; padding: 40px 10px; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ===== 定稿介紹頁用 ===== */
.plain-list { margin: 0; padding-left: 1.3em; }
.plain-list li { margin: 6px 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.example dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; font-size: 15px; }
.example dt { color: var(--muted); font-size: 13px; font-weight: 600; padding-top: 2px; }
.example dd { margin: 0; }
@media (max-width: 560px) { .example dl { grid-template-columns: 1fr; gap: 2px; } .example dd { margin-bottom: 10px; } }
.scroll { overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; }
.price-table th, .price-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.price-table th { font-size: 13px; color: var(--muted); font-weight: 600; }
p.notice { margin: 16px 0 0; }
.closing { font-size: clamp(18px, 2.6vw, 22px); font-weight: 600; margin: 0 0 20px; }
.hero h1 { margin-top: 0; }
