/*
 * HaitoolERP 官网样式。
 * 方向：像一份写给卖家的产品说明 —— 一个主色 + 中性灰，左对齐，日文排版优先，行高宽松；
 * 主视觉一律用真实 ERP 截图，不用渐变、玻璃、图标装饰、虚构插画。
 */
:root {
  --ink: #17191e;
  --ink-2: #3c414b;
  --muted: #6a707b;
  --line: #e2e0da;
  --line-strong: #cfccc4;
  --paper: #ffffff;
  --tint: #f5f4f0;
  --accent: #3a35c4;        /* 与 ERP 后台同一色相，压暗一档 */
  --accent-ink: #2b2799;
  --mark: #17191e;          /* 截图标注：用墨色，不另加颜色 */
  --wrap: 1160px;
  --gutter: 24px;
  --font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-zh: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .02em;
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
}
html:lang(zh-Hans) body { font-family: var(--font-zh); letter-spacing: .01em; }
html:lang(en) body { letter-spacing: 0; line-height: 1.7; }

/* 日文按词组断行，避免「出せる注文か / ら」这种断法（Chrome 119+；不支持的浏览器照常断行） */
html:lang(ja) h1, html:lang(ja) h2, html:lang(ja) h3, html:lang(ja) summary { word-break: auto-phrase; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: .01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- 按钮与链接 ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  line-height: 1.4;
  padding: 13px 24px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-ink); }
.btn-small { padding: 8px 14px; font-size: 14px; }
.btn-invert { background: #fff; color: var(--ink); }
.btn-invert:hover { background: #e9e8e4; }
.text-link { color: var(--accent); text-decoration: none; font-weight: 500; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 页头 ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: 0; text-decoration: none; color: var(--ink); }
.head-right { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav { display: flex; gap: 22px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--ink-2); cursor: pointer; }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.langs { display: flex; font-size: 13px; border-left: 1px solid var(--line); padding-left: 16px; }
.langs button {
  background: none; border: 0; padding: 4px 6px; cursor: pointer; color: var(--muted);
  border-bottom: 1.5px solid transparent;
}
.langs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.menu-btn { display: none; }

/* ---------- 首屏 ---------- */
.hero { padding: 72px 0 0; }
.hero h1 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.45; max-width: 21em; }
html:lang(en) .hero h1 { line-height: 1.2; max-width: 18em; letter-spacing: -.01em; }
.lead { color: var(--ink-2); font-size: 17px; max-width: 41em; margin-top: 24px; }
.actions { display: flex; align-items: center; gap: 28px; margin-top: 32px; flex-wrap: wrap; }
.hero-shot { margin-top: 48px; }
.shots-note { font-size: 13px; color: var(--muted); margin-top: 16px; padding-bottom: 72px; }
.page-head .shots-note { padding-bottom: 0; margin-top: 20px; }

.shot {
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 25, 30, .04), 0 18px 40px -24px rgba(23, 25, 30, .28);
}
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }

/* ---------- 区块 ---------- */
.band { padding: 88px 0; }
.band-tint { background: var(--tint); }
.sec-head { margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.5; }
.sec-head p { color: var(--muted); margin-top: 10px; max-width: 44em; }
.more { margin-top: 32px; }
.note { color: var(--muted); font-size: 14px; margin-top: 28px; max-width: 46em; }

/* ---------- 带编号标注的截图 ---------- */
.anno { margin: 0; }
.anno-frame { position: relative; overflow: visible; }
.anno-frame img { border-radius: 5px; }   /* 编号圆点可以伸出截图边缘，不被裁掉 */
.anno-box {
  position: absolute; box-sizing: content-box;
  margin: -4px 0 0 -4px; padding: 3px;
  border: 1.5px solid var(--mark); border-radius: 3px;
  pointer-events: none;
}
.anno-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--mark); color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: 0; flex: 0 0 auto;
}
.anno-box .anno-n { position: absolute; left: -11px; top: -11px; box-shadow: 0 0 0 2px #fff; }
.anno figcaption h3 { font-size: 17px; margin: 18px 0 8px; }
.anno-legend { counter-reset: none; }
.anno-legend li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.anno-legend .anno-n { transform: translateY(3px); }
.hero-shot .anno-legend { columns: 2; column-gap: 40px; }
.hero-shot .anno-legend li { break-inside: avoid; }
.manual { display: flex; flex-direction: column; gap: 56px; }
.manual .anno { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.manual .anno figcaption h3 { margin-top: 0; }
.sec-title { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.5; margin-bottom: 32px; }

/* ---------- 機能（首页） ---------- */
.core-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 40px;
  border-top: 1px solid var(--line); padding: 22px 0;
}
.core-row:last-child { border-bottom: 1px solid var(--line); }
.core-row h3 { font-size: 17px; }
.core-items { columns: 2; column-gap: 40px; }
.core-items li { break-inside: avoid; padding: 4px 0 4px 16px; position: relative; font-size: 15px; line-height: 1.7; }
.core-items a { text-decoration: none; color: var(--ink); }
.core-items a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.core-items li::before { content: ""; position: absolute; left: 0; top: 1em; width: 6px; height: 1px; background: var(--ink-2); }

/* ---------- 对接 ---------- */
.plat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.plat h3 { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.plain-list li { border-bottom: 1px solid var(--line-strong); padding: 11px 0; font-size: 16px; }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font-weight: 500; line-height: 1.6;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 20px; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); padding: 0 36px 22px 0; }

/* ---------- お知らせ ---------- */
.news { border-top: 1px solid var(--line-strong); max-width: 920px; }
.news li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.news time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; padding-top: 2px; }

/* ---------- 会社概要 / お問い合わせ ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
.co { margin: 0; border-top: 1px solid var(--line-strong); }
.co div { display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.co dt { color: var(--muted); font-size: 14px; }
.co dd { margin: 0; }
.contact-link { margin-top: 10px; }
.signup { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.signup-row .signup { margin: 0 0 88px; }

/* ---------- 页脚 ---------- */
.site-foot { padding: 56px 0 28px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot-brand p:not(.brand) { color: var(--muted); margin-top: 6px; max-width: 22em; }
.site-foot h2 { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.site-foot li a { text-decoration: none; color: var(--ink-2); cursor: pointer; line-height: 2.1; }
.site-foot li a:hover { color: var(--ink); text-decoration: underline; }
.foot-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}

/* ---------- 功能页 ---------- */
.page-head { padding: 64px 0 24px; }
.page-head h1 { font-size: clamp(28px, 3.2vw, 38px); }
.fg-nav ul { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 28px; font-size: 15px; }
.fg-nav a { color: var(--accent); text-decoration: none; font-weight: 500; }
.fg-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.fg { border-top: 1px solid var(--line-strong); padding: 48px 0 56px; }
.fg-head { font-size: 24px; margin-bottom: 24px; }
.fg-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
.fg-item h3 { font-size: 17px; line-height: 1.6; }
.fg-item p { color: var(--ink-2); margin-top: 6px; font-size: 15px; }
.fg-item.has-shot {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); gap: 40px; align-items: start;
  padding-bottom: 16px;
}
.fg-item .anno-legend li { font-size: 14px; padding: 4px 0; }

/* ---------- 法务页 ---------- */
.legal { max-width: 800px; padding-top: 64px; padding-bottom: 88px; }
.legal-head h1 { font-size: clamp(26px, 3vw, 34px); }
.legal-date { color: var(--muted); font-size: 14px; margin-top: 8px; }
.legal-intro { margin-top: 32px; }
.legal section { margin-top: 36px; }
.legal h2 { font-size: 18px; line-height: 1.6; }
.legal section p { margin-top: 8px; color: var(--ink-2); }
.legal ul { margin-top: 10px; }
.legal ul li { padding-left: 16px; position: relative; color: var(--ink-2); margin-top: 6px; }
.legal ul li::before { content: ""; position: absolute; left: 0; top: .95em; width: 6px; height: 1px; background: var(--ink-2); }
.legal-back { margin-top: 48px; }

/* ---------- 窄屏 ---------- */
@media (max-width: 960px) {
  .menu-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    margin-left: auto; width: 40px; height: 40px; background: none; border: 0; cursor: pointer; padding: 0 8px;
  }
  .menu-btn span { display: block; height: 1.5px; background: var(--ink); }
  .head-right {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 16px; padding: 16px var(--gutter) 24px;
  }
  .site-head.is-open .head-right { display: flex; }
  .nav { flex-direction: column; gap: 10px; font-size: 16px; }
  .langs { border-left: 0; padding-left: 0; }
  .langs button:first-child { padding-left: 0; }


  .core-row, .faq-wrap, .about, .manual .anno { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .about { gap: 48px; }
  .hero-shot .anno-legend { columns: 1; }
  .faq-wrap { gap: 0; }
  .fg-item.has-shot { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 15px; }
  .hero { padding-top: 40px; }
  .lead { font-size: 16px; }
  .hero-shot { margin-top: 32px; }
  .shots-note { padding-bottom: 48px; }
  .anno-n { width: 16px; height: 16px; font-size: 10px; }
  .anno-box .anno-n { left: -9px; top: -9px; }
  .news li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .co div { grid-template-columns: 6em minmax(0, 1fr); }
  .band { padding: 56px 0; }
  .core-items { columns: 1; }
  .plat { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .fg-items { grid-template-columns: minmax(0, 1fr); }
  .head-row .btn-small { display: inline-block; }
}
