/* guide.css — Shopee輸出ガイド（/shopee-*）共通スタイル
 * 方針: 読み物として信頼できる「資料」の佇まい。ブランドのネイビーを骨格に、
 *       オレンジは行動（CTA）と要点の目印だけに使う。影は使わず罫線で区切る。
 * グリッド: 4px 基準（4 / 8 / 12 / 16 / 24 / 32 / 48）。角丸は 4 / 6 / 8 の 3 段のみ。
 */
:root {
    --navy: #1a237e;
    --navy-deep: #111a5c;
    --accent: #F27E4B;          /* 装飾（罫・マーカー）用。文字色には使わない */
    --accent-strong: #C2501C;   /* 白文字を載せる面・強調文字用（コントラスト 4.5:1 以上） */
    --accent-strong-hover: #A84316;
    --fg: #1c2030;
    --fg-2: #454b5e;
    --fg-3: #6b7285;
    --fg-4: #9aa0b0;
    --line: rgba(26, 35, 126, 0.14);
    --line-subtle: rgba(26, 35, 126, 0.08);
    --surface: #ffffff;
    --surface-2: #f6f7fb;
    --surface-3: #eef0f8;
    --r-s: 4px;
    --r-m: 6px;
    --r-l: 8px;
    --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
    color: var(--fg);
    background: var(--surface);
    font-size: 16px;
    line-height: 1.9;
    font-feature-settings: "palt";
}

img { max-width: 100%; height: auto; display: block; }
address { font-style: normal; }
[id] { scroll-margin-top: 88px; }

a { color: var(--navy); text-decoration: underline; text-decoration-color: rgba(26, 35, 126, 0.35); text-underline-offset: 3px; transition: color 150ms var(--ease), text-decoration-color 150ms var(--ease); }
a:hover { color: var(--accent-strong); text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: var(--r-s); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: 16px; top: -48px; z-index: 200; padding: 8px 12px; background: var(--navy); color: #fff; border-radius: var(--r-s); text-decoration: none; }
.skip-link:focus { top: 8px; color: #fff; }

/* --- ヘッダー（LP と同じブランド表示） --- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(140%) blur(8px); }
.site-header__inner { max-width: 1040px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-header__brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.site-header__brand img { height: 40px; width: auto; }
.site-header__brand span { font-size: 1.5rem; font-weight: 900; line-height: 1; letter-spacing: 0.05em; color: var(--accent); }
.site-header__nav { display: flex; align-items: center; gap: 4px; }
.site-header__nav a { padding: 8px 12px; font-size: 0.875rem; font-weight: 500; color: var(--fg-2); text-decoration: none; border-radius: var(--r-m); white-space: nowrap; }
.site-header__nav a:hover { color: var(--navy); background: var(--surface-2); }
.site-header__nav a[aria-current="page"] { color: var(--navy); font-weight: 700; }
.site-header__nav a.site-header__cta { margin-left: 8px; padding: 8px 16px; background: var(--accent-strong); color: #fff; font-weight: 700; }
.site-header__nav a.site-header__cta:hover { background: var(--accent-strong-hover); color: #fff; }

/* --- 本文レイアウト --- */
.page { max-width: 792px; margin: 0 auto; padding: 24px 20px 48px; }

.breadcrumb { font-size: 0.8125rem; color: var(--fg-3); word-break: auto-phrase; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--fg-4); }
.breadcrumb a { color: var(--fg-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); text-decoration: underline; }

.article-header { padding: 32px 0 24px; border-bottom: 1px solid var(--line); }
.article-kicker { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; color: var(--accent-strong); }
.article-header h1 { margin-top: 8px; font-size: 2rem; font-weight: 900; line-height: 1.4; letter-spacing: -0.01em; color: var(--navy-deep); }
/* 見出しを語の途中で折り返さない（LP と同じ決まり） */
h1, h2, h3, h4 { word-break: auto-phrase; }
h2, h3, h4 { text-wrap: balance; }
.article-lead { margin-top: 16px; font-size: 1.0625rem; color: var(--fg-2); }
.article-meta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.8125rem; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.article-meta a { color: var(--fg-2); }

/* 要点（冒頭の結論） */
.keypoints { margin-top: 24px; padding: 20px 24px; background: var(--surface-2); border: 1px solid var(--line-subtle); border-left: 4px solid var(--accent); border-radius: var(--r-m); }
.keypoints h2 { margin: 0; padding: 0; border: 0; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.08em; color: var(--navy); }
.keypoints ul { margin: 8px 0 0; padding-left: 1.25em; }
.keypoints li { margin-top: 4px; }
.keypoints li::marker { color: var(--accent); }

/* 目次 */
.toc { margin-top: 24px; padding: 16px 24px; border: 1px solid var(--line); border-radius: var(--r-m); }
.toc h2 { margin: 0; padding: 0; border: 0; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.08em; color: var(--fg-2); }
.toc ol { margin: 8px 0 0; padding-left: 1.5em; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.toc li { margin-top: 2px; }
.toc li::marker { color: var(--fg-4); }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* 本文 */
.prose > section { margin-top: 48px; }
.prose h2 { padding-bottom: 12px; border-bottom: 2px solid var(--navy); font-size: 1.5rem; font-weight: 700; line-height: 1.5; color: var(--navy-deep); }
.prose h3 { margin-top: 32px; padding-left: 12px; border-left: 4px solid var(--accent); font-size: 1.1875rem; font-weight: 700; line-height: 1.5; color: var(--fg); }
.prose h4 { margin-top: 24px; font-size: 1rem; font-weight: 700; color: var(--navy); }
.prose p { margin-top: 16px; }
.prose ul, .prose ol { margin-top: 16px; padding-left: 1.5em; }
.prose li { margin-top: 8px; }
.prose li::marker { color: var(--fg-3); }
.prose strong { font-weight: 700; color: var(--navy-deep); }
.prose small, .note { font-size: 0.8125rem; color: var(--fg-3); line-height: 1.8; }
.note { margin-top: 12px; }
.prose sup { font-size: 0.6875rem; line-height: 0; }
.prose sup a { text-decoration: none; padding: 0 1px; }

/* 定義文（最初に答える 1 段落） */
.answer { margin-top: 16px; padding: 16px 20px; background: var(--surface-2); border-radius: var(--r-m); font-weight: 500; }

/* 注意書き */
.callout { margin-top: 24px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.callout > strong:first-child { display: block; font-size: 0.875rem; letter-spacing: 0.04em; color: var(--accent-strong); }
.callout p { margin-top: 4px; }

/* 手順 */
.steps { list-style: none; padding-left: 0 !important; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; margin-top: 16px; padding: 16px 20px 16px 64px; border: 1px solid var(--line); border-radius: var(--r-m); }
.steps > li::before { content: counter(step); position: absolute; left: 20px; top: 16px; width: 28px; height: 28px; border-radius: var(--r-s); background: var(--navy); color: #fff; font-size: 0.875rem; font-weight: 700; line-height: 28px; text-align: center; font-variant-numeric: tabular-nums; }
.steps > li > strong { display: block; color: var(--navy-deep); }
.steps > li p { margin-top: 4px; }

/* 表 */
.table-wrap { margin-top: 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-m); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.7; font-variant-numeric: tabular-nums; }
table.data caption { caption-side: top; padding: 12px 16px; text-align: left; font-size: 0.8125rem; font-weight: 700; color: var(--fg-2); background: var(--surface-2); border-bottom: 1px solid var(--line); }
table.data th, table.data td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-subtle); }
table.data tr:last-child > th, table.data tr:last-child > td { border-bottom: 0; }
table.data thead th { font-size: 0.8125rem; font-weight: 700; color: var(--fg-2); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data tbody th { font-weight: 700; color: var(--navy-deep); background: var(--surface); white-space: nowrap; }
table.data td + td, table.data th + td, table.data th + th { border-left: 1px solid var(--line-subtle); }
table.data .is-self > th, table.data .is-self > td { background: #fff8f3; }
table.data .is-self > th { box-shadow: inset 4px 0 0 var(--accent); }
table.data--wide { min-width: 920px; }
/* 横スクロール時もサービス名（1列目）を固定して、どの行を読んでいるか見失わないようにする */
table.data--wide thead th:first-child, table.data--wide tbody th { position: sticky; left: 0; z-index: 1; box-shadow: inset -1px 0 0 var(--line); }
table.data--wide .is-self > th { box-shadow: inset 4px 0 0 var(--accent), inset -1px 0 0 var(--line); }
table.data--wide tbody th { white-space: normal; min-width: 132px; max-width: 168px; }
table.data--mid { min-width: 640px; }

/* FAQ */
.faq-list { margin-top: 8px; }
.faq-list > div { padding: 20px 0; border-bottom: 1px solid var(--line-subtle); }
.faq-list > div:last-child { border-bottom: 0; }
.faq-list h3 { margin: 0; padding: 0 0 0 32px; border: 0; position: relative; font-size: 1.0625rem; line-height: 1.7; color: var(--navy-deep); }
.faq-list h3::before { content: "Q"; position: absolute; left: 0; top: 0; font-weight: 900; color: var(--accent-strong); }
.faq-list p { margin-top: 8px; padding-left: 32px; position: relative; }
.faq-list p::before { content: "A"; position: absolute; left: 0; top: 0; font-weight: 900; color: var(--navy); }

/* 出典 */
.sources ol { margin-top: 16px; padding-left: 1.75em; font-size: 0.875rem; line-height: 1.8; color: var(--fg-2); }
.sources li { margin-top: 8px; overflow-wrap: anywhere; }

/* 執筆・運営者 */
.author-box { margin-top: 48px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-l); display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; }
.author-box img { width: 56px; height: auto; border-radius: var(--r-m); }
.author-box__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; color: var(--fg-3); }
.author-box__name { margin-top: 2px; font-size: 1.0625rem; font-weight: 700; color: var(--navy-deep); }
.author-box p { margin-top: 8px; font-size: 0.9375rem; color: var(--fg-2); line-height: 1.8; }

/* CTA */
.cta-band { margin-top: 48px; padding: 32px 24px; background: var(--navy); border-radius: var(--r-l); color: #fff; text-align: center; }
.cta-band h2 { margin: 0; padding: 0; border: 0; font-size: 1.375rem; line-height: 1.5; color: #fff; }
.cta-band p { margin-top: 12px; font-size: 0.9375rem; color: rgba(255, 255, 255, 0.86); }
.cta-band__actions { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn-primary, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: var(--r-m); font-size: 1rem; font-weight: 700; line-height: 1.4; text-decoration: none; white-space: nowrap; transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease); }
.btn-primary { background: var(--accent-strong); color: #fff; border: 1px solid var(--accent-strong); }
.btn-primary:hover { background: var(--accent-strong-hover); border-color: var(--accent-strong-hover); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.5); }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.08); }
.cta-band small { display: block; margin-top: 12px; font-size: 0.75rem; color: rgba(255, 255, 255, 0.7); }

/* 関連ガイド */
.related { margin-top: 48px; }
.related h2 { padding-bottom: 12px; border-bottom: 2px solid var(--navy); font-size: 1.25rem; color: var(--navy-deep); }
.related ul { list-style: none; margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 12px; }
.related a { display: block; height: 100%; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-m); text-decoration: none; transition: border-color 150ms var(--ease), background-color 150ms var(--ease); }
.related a:hover { border-color: var(--navy); background: var(--surface-2); color: var(--navy); }
.related a strong { display: block; font-size: 0.9375rem; line-height: 1.6; color: var(--navy-deep); }
.related a span { display: block; margin-top: 4px; font-size: 0.8125rem; line-height: 1.7; color: var(--fg-3); }

/* --- フッター（全ページ共通の表記を踏襲） --- */
.site-footer { background: #111; color: #9a9a9a; padding: 48px 0 32px; font-size: 0.85rem; line-height: 1.8; }
.site-footer a { color: inherit; }
.site-footer__inner { max-width: 1040px; margin: 0 auto; padding: 0 20px; display: grid; gap: 24px; }
.site-footer__logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.25rem; letter-spacing: 0.05em; color: #F27E4B; text-decoration: none; }
.site-footer__logo img { height: 36px; width: auto; }
.site-footer__tagline { margin: 8px 0 0; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.site-footer__nav a { text-decoration: none; }
.site-footer__nav a:hover { color: #F27E4B; }
.site-footer__updated { margin: 0; font-size: 0.8rem; opacity: 0.7; }
.site-footer__copy { margin: 8px 0 0; opacity: 0.8; }
@media (min-width: 768px) {
    .site-footer__inner { grid-template-columns: 1.2fr 1fr; }
    .site-footer__nav, .site-footer__updated, .site-footer__copy { grid-column: 1 / -1; }
}

/* 比較表は PC では本文幅から左右に張り出し、横スクロールなしで全列を見せる */
@media (min-width: 1080px) {
    .table-wrap:has(> table.data--wide) { width: 1000px; margin-left: calc((100% - 1000px) / 2); }
    table.data--wide thead th:first-child, table.data--wide tbody th { position: static; box-shadow: none; }
    table.data--wide .is-self > th { box-shadow: inset 4px 0 0 var(--accent); }
}

/* --- スマホ --- */
@media (max-width: 768px) {
    .site-header__nav a:not(.site-header__cta) { display: none; }
    .site-header__brand img { height: 36px; }
    .site-header__brand span { font-size: 1.375rem; }
    .page { padding: 16px 16px 48px; }
    .article-header { padding: 24px 0 20px; }
    .article-header h1 { font-size: 1.5rem; }
    .article-lead { font-size: 1rem; }
    .prose h2 { font-size: 1.25rem; }
    .prose h3 { font-size: 1.0625rem; }
    .keypoints, .toc { padding: 16px; }
    .steps > li { padding: 16px 16px 16px 56px; }
    .steps > li::before { left: 16px; }
    .author-box { padding: 16px; grid-template-columns: 40px 1fr; gap: 12px; }
    .author-box img { width: 40px; }
    .cta-band { padding: 24px 16px; }
    .btn-primary, .btn-ghost { width: 100%; white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

@media print {
    .site-header, .cta-band, .related, .skip-link { display: none; }
    .page { max-width: none; padding: 0; }
    a { color: inherit; text-decoration: none; }
}
