/* =========================================================
   FBデータ変換 — サイト共通スタイル
   トーン: スモールビジネス向け。明るい・親しみやすい・でも金融ツールとしての信頼感
   ========================================================= */
:root {
  --bg: #fbfaf7;            /* 温かみのある生成り */
  --card: #ffffff;
  --ink: #1d2433;
  --muted: #5f6b7a;
  --line: #e6e3dc;
  --navy: #14305c;          /* 信頼のネイビー */
  --navy-2: #1d4a8f;
  --accent: #ff7a1a;        /* キャッチーなオレンジ（CTA） */
  --accent-2: #ffb26b;
  --accent-soft: #fff1e6;
  --blue-soft: #e8f0fb;
  --ok: #178a4c; --ok-bg: #e4f6ea;
  --ng: #c93a2b; --ng-bg: #fdecea;
  --warn: #9a6700; --warn-bg: #fff6d6;
  --radius: 16px;
  --shadow: 0 2px 6px rgba(20,30,50,.05), 0 12px 32px rgba(20,30,50,.06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.7 "Noto Sans JP", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", sans-serif; }
a { color: var(--navy-2); }
h1, h2, h3 { line-height: 1.3; letter-spacing: .01em; }
h1 { margin: 0; font-size: 22px; }
h2 { font-size: 24px; margin: 0 0 8px; }
h3 { font-size: 17px; margin: 0 0 6px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.desc { color: var(--muted); margin: 0 0 18px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0; }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Consolas, "Courier New", monospace; }
.center { text-align: center; }

/* ---------- site header / nav ---------- */
.site-head { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-head .in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .logo { width: 38px; height: 38px; }
.brand b { font-size: 18px; }
.brand small { display: block; font-size: 11px; color: var(--muted); line-height: 1.2; }
.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); font-size: 14px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a.is-current { background: var(--blue-soft); color: var(--navy-2); }
.nav a.cta { background: var(--accent); color: #fff; font-weight: 700; margin-left: 6px; }
.nav a.cta:hover { background: #ee6a0c; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 18px; }
@media (max-width: 760px) {
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-top: 8px; }
  .nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .site-head .in { flex-wrap: wrap; }
}

/* ---------- hero ---------- */
.hero { background: radial-gradient(1200px 500px at 20% -10%, #fff3e8 0%, transparent 60%), radial-gradient(900px 400px at 100% 0%, #e8f0fb 0%, transparent 55%), var(--bg); padding: 56px 0 28px; }
.hero .in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.hero .kicker { display: inline-block; background: var(--accent-soft); color: #b5500a; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.hero h1 { font-size: 40px; line-height: 1.25; margin: 0 0 14px; color: var(--navy); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 17px; color: var(--muted); margin: 0 0 22px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; color: var(--muted); }
.hero .trust span::before { content: '✔ '; color: var(--ok); font-weight: 700; }
.hero-art { width: 100%; height: auto; }
@media (max-width: 860px) { .hero .in { grid-template-columns: 1fr; } .hero h1 { font-size: 30px; } .hero-art { max-width: 420px; margin: 0 auto; display: block; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; text-decoration: none; color: var(--ink); font: inherit; font-weight: 700; }
.btn:hover { background: #f6f4ef; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: #ee6a0c; }
.btn.navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.navy:hover { background: var(--navy-2); }
.btn.big { font-size: 17px; padding: 15px 28px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- sections ---------- */
.section { padding: 48px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { text-align: center; font-size: 28px; color: var(--navy); }
.section .sub { text-align: center; color: var(--muted); margin: 0 auto 28px; max-width: 640px; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feat .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 12px; }
.feat h3 { font-size: 17px; }
.feat p { margin: 0; color: var(--muted); font-size: 14px; }
.steps3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: s; }
.steps3 > div { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 22px 64px; }
.steps3 > div::before { counter-increment: s; content: counter(s); position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.steps3 h3 { font-size: 16px; }
.steps3 p { margin: 0; color: var(--muted); font-size: 14px; }
.compare { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
.compare th { background: #f5f3ee; }
.compare td.y { color: var(--ok); font-weight: 700; }
.compare td.n { color: var(--muted); }
.compare tr.hl td, .compare tr.hl th { background: var(--accent-soft); }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: stretch; }
.plan { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.plan.hot { border-color: var(--accent); box-shadow: var(--shadow); }
.plan .ribbon { position: absolute; top: -12px; left: 20px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h3 { font-size: 20px; margin: 0; }
.plan .price { font-size: 34px; font-weight: 800; color: var(--navy); line-height: 1; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan ul { margin: 6px 0 12px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.plan li::before { content: '✔ '; color: var(--ok); font-weight: 700; }
.plan li.no { color: var(--muted); } .plan li.no::before { content: '— '; color: #b9c0c9; }
.plan .btn { margin-top: auto; }
.btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ---------- FAQ ---------- */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; display: flex; gap: 10px; align-items: flex-start; }
.faq summary::before { content: 'Q'; flex: none; width: 24px; height: 24px; border-radius: 6px; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; margin-top: 2px; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .a { padding: 12px 0 14px 34px; color: #2c3543; font-size: 14.5px; }
.faq h3 { margin: 26px 0 10px; color: var(--navy); }

/* ---------- article pages ---------- */
.article { max-width: 820px; margin: 0 auto; padding: 40px 20px 60px; }
.article h1 { font-size: 30px; color: var(--navy); margin-bottom: 6px; }
.article .updated { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.article h2 { font-size: 21px; margin: 32px 0 10px; color: var(--navy); border-left: 4px solid var(--accent); padding-left: 10px; }
.article h3 { font-size: 16px; margin: 20px 0 6px; }
.article p, .article li { font-size: 15px; }
.article table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.article th, .article td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.article th { background: #f5f3ee; }
.callout { background: var(--blue-soft); border-left: 4px solid var(--navy-2); padding: 12px 16px; border-radius: 8px; margin: 14px 0; font-size: 14.5px; }
.callout.warn { background: var(--warn-bg); border-color: #e0a800; }
.callout.ok { background: var(--ok-bg); border-color: var(--ok); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: #fff; margin-top: 40px; }
.site-foot .in { padding: 28px 20px; display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 20px; font-size: 13px; }
.site-foot h4 { margin: 0 0 8px; font-size: 13px; color: var(--navy); }
.site-foot a { display: block; color: var(--muted); text-decoration: none; margin: 4px 0; }
.site-foot a:hover { color: var(--navy-2); }
.site-foot .copy { color: var(--muted); font-size: 12px; padding: 0 20px 24px; }
@media (max-width: 760px) { .site-foot .in { grid-template-columns: 1fr 1fr; } }

/* =========================================================
   ツール本体（4ステップ）
   ========================================================= */
.tool { scroll-margin-top: 70px; }
.tool-head { text-align: center; padding: 28px 0 6px; }
.tool-head h2 { font-size: 26px; color: var(--navy); margin: 0 0 4px; }
.tool-head p { color: var(--muted); margin: 0; }
.badge-lock { display: inline-block; background: var(--ok-bg); color: var(--ok); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; }

.stepper { display: flex; align-items: center; gap: 6px; padding: 16px 20px 6px; }
.stepper .step { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: default; color: #a3adb9; font: inherit; }
.stepper .step .dot { width: 36px; height: 36px; border-radius: 50%; background: #e9e6df; color: #8a94a1; display: flex; align-items: center; justify-content: center; font-weight: 800; transition: all .2s; }
.stepper .step .lbl { font-size: 12px; white-space: nowrap; }
.stepper .step.is-active { color: var(--navy-2); }
.stepper .step.is-active .dot { background: var(--navy-2); color: #fff; box-shadow: 0 0 0 5px var(--blue-soft); }
.stepper .step.is-done { color: var(--ok); cursor: pointer; }
.stepper .step.is-done .dot { background: var(--ok); color: #fff; }
.stepper .bar { flex: 1; height: 3px; background: #e9e6df; border-radius: 2px; margin-bottom: 22px; }
.stepper .bar.is-done { background: var(--ok); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; margin: 12px 0 28px; box-shadow: var(--shadow); }
.panel h2 { font-size: 20px; }

.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 18px; }
.kind { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; text-align: center; transition: all .15s; background: #fff; }
.kind input { position: absolute; opacity: 0; pointer-events: none; }
.kind .ic { font-size: 26px; }
.kind b { font-size: 15px; }
.kind small { color: var(--muted); font-size: 12px; }
.kind:hover { border-color: var(--accent-2); }
.kind:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.drop { border: 2px dashed #cfc9bd; border-radius: 16px; padding: 30px 20px; text-align: center; background: #fffdf9; transition: all .15s; }
.drop.over { background: var(--accent-soft); border-color: var(--accent); transform: scale(1.005); }
.drop p { margin: 4px 0; }
.drop-ic { width: 72px; height: 72px; }
.drop-main { font-size: 18px; font-weight: 800; margin-top: 8px !important; color: var(--navy); }
.btn-link { color: var(--navy-2); text-decoration: underline; cursor: pointer; font-weight: 700; }
.fileinfo { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-size: 14px; }
.fileinfo.err { background: var(--ng-bg); color: var(--ng); }
.samples { display: flex; gap: 14px; align-items: center; margin: 14px 0 0; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 26px; }
.features > div { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 12px; background: #f7f5f0; }
.features .ic { font-size: 22px; }
.features small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.or { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 12px 0 6px !important; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); max-width: 120px; }
.gbtn { background: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 16px; }
.grid label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); gap: 4px; }
.grid label.span2 { grid-column: span 2; }
.preview { color: var(--navy-2); font-family: ui-monospace, Consolas, monospace; min-height: 1.2em; }
.preview.ng { color: var(--ng); font-family: inherit; }
.preview.warn { color: var(--warn); font-family: inherit; }
input, select, button { font: inherit; }
input:not([type="checkbox"]):not([type="radio"]), select { padding: 9px 11px; border: 1px solid #d8d3c8; border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: 2px solid #ffd2b0; border-color: var(--accent); }
.adv { margin-top: 16px; }
details summary { cursor: pointer; color: var(--navy-2); font-size: 14px; }
.adv .grid { margin-top: 12px; }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.row label { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.pill { background: var(--blue-soft); color: var(--navy-2); border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 700; }
.notes { background: #eef6ff; border: 1px solid #cfe1fb; color: #1b4d8c; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; vertical-align: middle; }
th { background: #f5f3ee; position: sticky; top: 0; z-index: 1; }
tr:last-child td { border-bottom: 0; }
.maptable td.field { font-weight: 700; }
.maptable .req { color: var(--ng); margin-left: 2px; }
.maptable select { min-width: 200px; }
.maptable select.unset { border-color: #e8b7b0; background: var(--ng-bg); }
.maptable td.ex { color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.maptable tr.optional td { color: var(--muted); }
.maptable tr.optional td.field { font-weight: 500; }
.maptable td .sub, td .sub { color: var(--muted); font-size: 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 6px 0 16px; }
.cards > div { padding: 12px 16px; border-radius: 12px; background: #f7f5f0; }
.cards small { display: block; color: var(--muted); font-size: 12px; }
.cards b { font-size: 24px; }
.cards .ok { background: var(--ok-bg); } .cards .ok b { color: var(--ok); }
.cards .ng { background: var(--ng-bg); } .cards .ng b { color: var(--ng); }
.cards .warn { background: var(--warn-bg); } .cards .warn b { color: var(--warn); }
.alert { background: var(--ng-bg); color: var(--ng); padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }

tr.bad td { background: var(--ng-bg); }
tr.warn td { background: var(--warn-bg); }
tr.skip td { opacity: .45; }
td.r, th.r { text-align: right; }
td input.name { width: 240px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; font-family: ui-monospace, Consolas, monospace; }
td .msg { display: block; font-size: 12px; white-space: normal; max-width: 320px; }
td .msg.ng { color: var(--ng); } td .msg.warn { color: var(--warn); } td .msg.info { color: #1b4d8c; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.ng { background: var(--ng-bg); color: var(--ng); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.infer { background: #efe6ff; color: #5b2ca8; }

.nav-btns { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* Pro・設定・プロファイル・履歴 */
.btn.mini { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn.on { background: var(--ok-bg); color: var(--ok); border-color: #b9e3c6; }
.btn.danger { color: var(--ng); border-color: #e8b7b0; }
.btn.danger:hover { background: var(--ng-bg); }
.tool-head .btn.mini { margin-left: 6px; vertical-align: middle; }
.dlg { border: 0; border-radius: 16px; padding: 22px 24px; max-width: 560px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(20,30,50,.25); }
.dlg::backdrop { background: rgba(20,30,50,.45); }
.dlg h3 { font-size: 19px; margin: 0 0 10px; }
.dlg h4 { font-size: 14px; margin: 18px 0 6px; color: var(--navy); }
.dlg textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 13px; padding: 9px 11px; border: 1px solid #d8d3c8; border-radius: 10px; resize: vertical; }
.dlg .nav-btns { margin-top: 14px; }
.pro-status { background: #f7f5f0; border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 10px; }
.chk { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.profilebar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #f7f5f0; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.profilebar label { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.history { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.hist { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: #f7f5f0; border-radius: 10px; padding: 10px 14px; font-size: 13px; flex-wrap: wrap; }
.dl { margin: 20px 0 10px; padding: 18px; border-radius: 14px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ruler { margin: 10px 0 0; font-size: 12px; color: var(--muted); overflow-x: auto; }
.out { margin: 0; font-size: 12px; background: #0f1720; color: #d7e0ea; padding: 12px; border-radius: 10px; overflow-x: auto; max-height: 360px; }
.dictline { color: var(--muted); font-size: 12px; text-align: center; margin: -10px 0 20px; }

@media (max-width: 640px) {
  .panel { padding: 18px 16px; }
  .kinds { grid-template-columns: 1fr; }
  .grid label.span2 { grid-column: span 1; }
  .stepper .step .lbl { font-size: 11px; }
  .section h2 { font-size: 23px; }
}
