/* 業務キット — mobile-first, system fonts only (no web-font download). */
:root {
  --brand: #1F6F5C;
  --brand-strong: #17584a;
  --brand-soft: #E8F2EF;
  --bg: #ffffff;
  --surface: #f7faf9;
  --text: #1a2421;
  --muted: #56655f;
  --border: #d5e0dc;
  --focus: #b8860b;
  --mark: #fff3c4;
  --on-brand: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #5fbfa5;
    --brand-strong: #7fd3bb;
    --brand-soft: #173a31;
    --bg: #111816;
    --surface: #17211e;
    --text: #e6eeeb;
    --muted: #a3b4ae;
    --border: #2d3c37;
    --mark: #5a4a12;
    --on-brand: #0b1311;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #5fbfa5; --brand-strong: #7fd3bb; --brand-soft: #173a31; --bg: #111816; --surface: #17211e;
  --text: #e6eeeb; --muted: #a3b4ae; --border: #2d3c37; --mark: #5a4a12; --on-brand: #0b1311; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "BIZ UDPGothic", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.85;
  letter-spacing: .02em;
  font-feature-settings: "palt" 0;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}
h1, h2, h3, .card-title { line-height: 1.45; letter-spacing: .03em; word-break: auto-phrase; font-feature-settings: "palt" 1; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.25rem); margin: .2em 0 .5em; }
h2 { font-size: clamp(1.2rem, 1.1rem + .6vw, 1.5rem); margin: 2em 0 .6em; }
h3 { font-size: 1.05rem; margin: 1.2em 0 .4em; }
p, ul, ol, dl { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: .2em; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
mark.todo { background: var(--mark); color: inherit; padding: 0 .2em; font-weight: 700; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .92em; background: var(--surface); padding: .1em .35em; border-radius: 4px; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 48rem; }
.section { margin: 2.5rem 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--on-brand); padding: .5em 1em; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; line-height: 1.7; }
.lead { font-size: 1.05rem; color: var(--muted); }
.eyebrow { color: var(--brand); font-weight: 700; font-size: .85rem; letter-spacing: .08em; margin: 0; }
.sample-banner { background: #8a1c1c; color: #fff; text-align: center; padding: .4em 16px; font-size: .875rem; font-weight: 700; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; }
.logo-mark { width: 30px; height: 30px; color: #1F6F5C; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; font-size: 1.1rem; }
.logo-text small { font-size: .7rem; color: var(--muted); font-weight: 600; letter-spacing: .1em; }
.nav { list-style: none; display: flex; gap: 4px 16px; padding: 0; margin: 0; font-size: .9rem; flex-wrap: wrap; }
.nav a { display: inline-block; padding: 8px 2px; color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--brand); text-decoration: underline; }
.site-footer { margin-top: 4rem; padding: 2rem 0 6rem; background: var(--surface); border-top: 1px solid var(--border); font-size: .875rem; color: var(--muted); }
.footer-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { color: var(--text); display: inline-block; padding: 6px 0; }
.production-note { margin-bottom: 1rem; }

/* hero */
.hero { background: linear-gradient(180deg, var(--brand-soft), var(--bg)); padding: 3rem 0 2rem; }
.hero h1 { font-size: clamp(1.75rem, 1.3rem + 2.4vw, 2.75rem); margin: .3em 0 .4em; }
.hero-sub { max-width: 40rem; color: var(--muted); font-size: 1.05rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 48px; padding: .6em 1.4em; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.4; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-secondary { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn[disabled] { background: var(--border); color: var(--muted); cursor: not-allowed; }
.btn-buy { width: 100%; margin: .5rem 0; font-size: 1.1rem; }
.cta-row { margin-top: 1.5rem; }

/* cards */
.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-link:hover .card-title { color: var(--brand); text-decoration: underline; }
.card-body { padding: 14px 16px 16px; }
.card-title { font-size: 1.05rem; margin: 0 0 .3em; }
.card-sub { color: var(--muted); font-size: .9rem; margin: 0 0 .5em; line-height: 1.7; }
.seg-card .card-body { border-top: 4px solid var(--brand); height: 100%; }
.count { font-size: .8rem; color: var(--brand); font-weight: 700; margin: 0; }
.thumb { background: var(--brand-soft); aspect-ratio: 1200 / 630; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--on-brand); background: var(--brand); border-radius: 4px; padding: 0 .5em; margin-bottom: .3em; }
.price { font-weight: 800; font-size: 1.15rem; margin: 0; font-variant-numeric: tabular-nums; }
.price-lg { font-size: 1.75rem; }
.tax { font-size: .75em; font-weight: 600; color: var(--muted); margin-left: .15em; }
.promise { background: var(--surface); border-radius: var(--radius); padding: 16px; }
.promise h3 { margin-top: 0; color: var(--brand); }
.promise p { margin: 0; font-size: .95rem; }
.empty { background: var(--surface); padding: 1rem; border-radius: var(--radius); }

/* breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0 .5em; padding: 0; margin: 1rem 0; font-size: .8rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: .5em; }
.page-head { margin: 1rem 0 2rem; }

/* segment page */
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.8em; margin-bottom: .5em; }
.checklist li::before { content: ""; position: absolute; left: .2em; top: .55em; width: .9em; height: .5em; border-left: 3px solid var(--brand); border-bottom: 3px solid var(--brand); transform: rotate(-45deg); }
.pains { background: var(--surface); border-radius: var(--radius); padding: 1rem 16px; }
.pains h2 { margin-top: .5rem; }
.upsell { border: 2px solid var(--brand); border-radius: var(--radius); padding: 1rem 16px 1.25rem; background: var(--brand-soft); }
.upsell h2 { margin-top: .2em; }
.bundle-items { padding-left: 1.2em; }

/* product page */
.product-top { display: grid; gap: 24px; }
.product-media { background: var(--brand-soft); border-radius: var(--radius); overflow: hidden; aspect-ratio: 1200 / 630; }
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.product-summary h1 { margin-top: .1em; }
.purchase-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: 1rem; background: var(--surface); }
.terms { margin: 0 0 .5rem; font-size: .9rem; line-height: 1.7; }
.terms div { display: grid; grid-template-columns: 8.5em 1fr; gap: 8px; padding: .45em 0; border-bottom: 1px solid var(--border); }
.terms dt { font-weight: 700; color: var(--muted); }
.terms dd { margin: 0; }
.faq { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: var(--bg); }
.faq summary { cursor: pointer; padding: .8em 1em; font-weight: 700; list-style-position: inside; }
.faq > div { padding: 0 1em .9em 1em; }
.notes ul { padding-left: 1.2em; color: var(--muted); font-size: .9rem; }
@media (min-width: 48rem) {
  .product-top { grid-template-columns: 1fr 1fr; align-items: start; }
  .product-summary { position: sticky; top: 16px; }
}

/* legal pages */
.prose h2, .product .section > h2 { border-left: 4px solid var(--brand); padding-left: .6em; }
.product .upsell > h2 { border-left: 0; padding-left: 0; }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
.table-wrap { overflow-x: auto; }
table.spec { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.75; }
table.spec th, table.spec td { border: 1px solid var(--border); padding: .7em .8em; text-align: left; vertical-align: top; }
table.spec th { background: var(--surface); white-space: nowrap; font-weight: 700; }
table.spec td p:last-child, table.spec td ul:last-child { margin-bottom: 0; }
@media (max-width: 40rem) {
  table.spec tbody th[scope="row"], table.spec tbody th[scope="row"] + td { display: block; border-top: 0; }
  table.spec tbody th[scope="row"] { border-top: 1px solid var(--border); white-space: normal; }
}
.meta { color: var(--muted); font-size: .875rem; margin-top: 2rem; }

/* chat widget */
.chat { position: fixed; right: 16px; bottom: 16px; z-index: 50; }
.chat-toggle { display: inline-flex; gap: .4em; align-items: center; min-height: 48px; padding: .5em 1.1em; border-radius: 999px; border: 0; background: var(--brand); color: var(--on-brand); font: inherit; font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,.2); cursor: pointer; }
.chat-toggle span { display: inline-grid; place-items: center; width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--on-brand); color: var(--brand); font-size: .85em; }
.chat-panel { position: fixed; right: 16px; bottom: 76px; width: min(26rem, calc(100vw - 32px)); max-height: min(38rem, calc(100vh - 100px)); display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,.2); overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--brand); color: var(--on-brand); }
.chat-head h2 { font-size: 1rem; margin: 0; border: 0; padding: 0; }
.badge { font-size: .7rem; background: var(--on-brand); color: var(--brand); border-radius: 4px; padding: 0 .4em; margin-left: .3em; vertical-align: middle; }
.chat-close { background: transparent; border: 0; color: var(--on-brand); font-size: 1.5rem; width: 44px; height: 44px; cursor: pointer; }
.chat-note { font-size: .75rem; line-height: 1.6; color: var(--muted); padding: 8px 12px; margin: 0; border-bottom: 1px solid var(--border); }
.chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 8rem; }
.msg { padding: .6em .8em; border-radius: 10px; font-size: .9rem; line-height: 1.7; max-width: 92%; white-space: pre-wrap; }
.msg p { margin: 0 0 .4em; white-space: normal; }
.msg-user { align-self: flex-end; background: var(--brand); color: var(--on-brand); }
.msg-user a { color: inherit; }
.msg-assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); }
.msg.pending { color: var(--muted); }
.faq-hits { padding-left: 1.1em; margin: 0 0 .4em; white-space: normal; }
.chat-form { display: flex; gap: 8px; padding: 8px; border-top: 1px solid var(--border); }
.chat-form textarea { flex: 1; resize: none; font: inherit; font-size: 1rem; padding: .5em; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
.chat-form .btn { min-height: 44px; padding: .4em 1em; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .chat, .site-header nav, .skip { display: none !important; } }
