/* =========================================================
   Mahiro Studio 共通デザイン基盤 (ms.css) — モック v0.1
   コンセプト：親しみやすさ × 使いやすさ
   ライト/ダークは OS 設定に自動追従（prefers-color-scheme）
   ========================================================= */

/* ---------- 1. デザイントークン ---------- */
:root {
  color-scheme: light dark;

  /* ベース（ライト：あたたかいクリーム） */
  --bg: #fbf7f1;
  --bg-deco: #f3ebdf;
  --surface: #ffffff;
  --surface-2: #f6f0e7;
  --border: #ebe1d3;
  --text: #3a2f28;
  --muted: #7a6d62;

  /* ブランド：そら色（メイン）＋はちみつ色（アクセント） */
  --brand: #2a86c9;
  --brand-hover: #1f72ad;
  --brand-soft: #e2f1fb;
  --on-brand: #ffffff;
  --honey: #f2b33d;
  --honey-soft: #fdf1d6;
  --honey-text: #8a5a00;

  /* カテゴリ色 */
  --c-tools: #2a86c9;  --c-tools-soft: #e2f1fb;
  --c-games: #e2664f;  --c-games-soft: #fde7e2;
  --c-space: #6f5fd8;  --c-space-soft: #ebe8fc;
  --c-life:  #2f9e6f;  --c-life-soft:  #e0f4ea;

  --ok: #2f9e6f; --warn: #d98a12; --danger: #d4483b;

  /* 形・影・文字 */
  --radius-s: 10px;
  --radius: 18px;
  --radius-l: 28px;
  --shadow: 0 1px 2px rgb(58 47 40 / .05), 0 6px 20px rgb(58 47 40 / .06);
  --shadow-hover: 0 2px 4px rgb(58 47 40 / .06), 0 14px 32px rgb(58 47 40 / .10);
  --font-round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-body: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --container: 1080px;

  accent-color: var(--brand);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* ベース（ダーク：やわらかい夜色。真っ黒にしない） */
    --bg: #191a21;
    --bg-deco: #20222b;
    --surface: #23252e;
    --surface-2: #2b2e38;
    --border: #383b47;
    --text: #f2ede6;
    --muted: #aba49b;

    --brand: #7cc6ef;
    --brand-hover: #a3d8f5;
    --brand-soft: #1f3442;
    --on-brand: #10202c;
    --honey: #f5c25e;
    --honey-soft: #3a3020;
    --honey-text: #f5c25e;

    --c-tools: #7cc6ef;  --c-tools-soft: #1f3442;
    --c-games: #f59a87;  --c-games-soft: #40272a;
    --c-space: #ab9ff5;  --c-space-soft: #2d2945;
    --c-life:  #6fd3a5;  --c-life-soft:  #1f3a30;

    --ok: #6fd3a5; --warn: #f5c25e; --danger: #f28a80;

    --shadow: 0 1px 2px rgb(0 0 0 / .25), 0 6px 20px rgb(0 0 0 / .18);
    --shadow-hover: 0 2px 4px rgb(0 0 0 / .3), 0 14px 32px rgb(0 0 0 / .3);
  }
}

/* ---------- 2. ベース ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 { font-family: var(--font-round); line-height: 1.4; margin: 0; font-weight: 700; letter-spacing: .02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--honey-soft); color: var(--text); }
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 3. ヘッダー / フッター ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-round); font-weight: 700; font-size: 20px; }
.logo:hover { color: var(--text); }
.logo-mark { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-size: 18px; position: relative; }
.logo-mark::after { content: ""; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--honey); border: 2px solid var(--bg); }
.logo small { color: var(--muted); font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.site-nav .nav-ext { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); }

.site-footer { margin-top: 80px; background: var(--bg-deco); border-top: 1px solid var(--border); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 48px 0 28px; }
.footer-inner h2 { font-size: 15px; margin-bottom: 10px; }
.footer-inner p, .footer-inner li { color: var(--muted); font-size: 14px; }
.footer-inner ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--brand); text-decoration: underline; }
.copyright { border-top: 1px solid var(--border); padding: 18px 0 26px; color: var(--muted); font-size: 12px; }

/* ---------- 4. 共通パーツ ---------- */
/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  font: 700 15px/1 var(--font-body); cursor: pointer; text-decoration: none;
  transition: transform .15s, background-color .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--brand); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--on-brand); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn-ghost { background: transparent; }

/* チップ / バッジ */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.chip .icon { width: 1em; height: 1em; }
.chip-ok { background: var(--c-life-soft); color: var(--c-life); border-color: transparent; }
.chip-new { background: var(--honey); color: #3a2a00; border-color: transparent; font-weight: 800; letter-spacing: .04em; }
.chip-pc { background: var(--honey-soft); color: var(--honey-text); border-color: transparent; }

/* カード */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* アイコンタイル（カテゴリ色で塗る） */
.tile { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; background: var(--tile-soft, var(--c-tools-soft)); color: var(--tile, var(--c-tools)); }
.tile .icon { width: 26px; height: 26px; }
[data-cat="tools"] { --tile: var(--c-tools); --tile-soft: var(--c-tools-soft); }
[data-cat="games"] { --tile: var(--c-games); --tile-soft: var(--c-games-soft); }
[data-cat="space"] { --tile: var(--c-space); --tile-soft: var(--c-space-soft); }
[data-cat="life"]  { --tile: var(--c-life);  --tile-soft: var(--c-life-soft); }

/* セクション見出し */
.section { padding-top: 64px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1 var(--font-body); letter-spacing: .14em; color: var(--brand); text-transform: uppercase; margin-bottom: 8px; }
.eyebrow::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--honey); }
.section-head h2 { font-size: clamp(24px, 3vw, 30px); }
.section-head p { color: var(--muted); font-size: 14px; }

/* お知らせ */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; border-radius: var(--radius); background: var(--honey-soft); color: var(--text); font-size: 14px; }
.notice .icon { color: var(--honey-text); margin-top: 3px; }

/* FAQ・詳細ガイド（AdSense審査・ユーザーサポート両対応の共通コンポーネント） */
.faq-list { display: grid; gap: 10px; }
details.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 14px 18px; box-shadow: var(--shadow); }
details.faq-item summary { cursor: pointer; font-weight: 700; font-size: 15px; color: var(--text); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "＋"; font-weight: 700; color: var(--brand); flex: none; font-size: 16px; }
details.faq-item[open] summary::after { content: "－"; }
details.faq-item p { margin: 10px 0 0; font-size: 14px; color: var(--muted); line-height: 1.8; padding-top: 10px; border-top: 1px solid var(--border); }
.guide-prose { padding: 24px 28px; display: grid; gap: 14px; }
.guide-prose h3 { font-size: 17px; color: var(--text); margin-top: 4px; }
.guide-prose p { font-size: 14.5px; color: var(--muted); line-height: 1.85; }

/* 広告枠（位置と見た目を全ページで統一） */
.ad-slot { margin-top: 40px; border: 1.5px dashed var(--border); border-radius: var(--radius); min-height: 120px; display: grid; place-items: center; color: var(--muted); font-size: 12px; letter-spacing: .1em; }

/* ---------- 5. トップページ ---------- */
.hero { position: relative; padding: 56px 0 24px; }
.hero-inner { display: grid; grid-template-columns: 1.25fr .9fr; align-items: center; gap: 40px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 56px); line-height: 1.25; margin: 14px 0 18px; }
.hero h1 .mark { background: linear-gradient(transparent 62%, var(--honey-soft) 62%); padding: 0 .08em; }
.hero-lead { color: var(--muted); font-size: 17px; max-width: 34em; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-visual { position: relative; aspect-ratio: 1; max-width: 400px; justify-self: center; width: 100%; }
.hero-blob { position: absolute; inset: 6%; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; background: radial-gradient(circle at 30% 30%, var(--honey-soft), var(--brand-soft)); }
.hero-visual img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 24px rgb(58 47 40 / .18)); }
.hero-bubble { position: absolute; left: -6%; bottom: 14%; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 18px 18px 18px 4px; padding: 10px 16px; font: 700 14px/1.5 var(--font-round); }
.hero-bubble small { display: block; font: 500 12px/1.4 var(--font-body); color: var(--muted); }

/* 統計 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 36px; }
.stat { padding: 16px 18px; display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); color: var(--text); }
.stat strong { display: block; font: 700 22px/1.2 var(--font-round); }
.stat span { font-size: 13px; color: var(--muted); }

/* フィルタ & 検索 */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { font: 700 14px/1 var(--font-body); padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.filter .count { font-size: 12px; color: var(--muted); font-weight: 600; }
.filter:hover { border-color: var(--brand); }
.filter[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.filter[aria-pressed="true"] .count { color: inherit; opacity: .7; }
.search { position: relative; flex: 0 1 280px; }
.search .icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); }
.search input { width: 100%; height: 44px; padding: 0 16px 0 42px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: 15px var(--font-body); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

/* 作品カード */
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.work {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 22px; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.work:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--tile) 45%, var(--border)); }
.work-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.work-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.work-kicker { font-size: 12px; font-weight: 700; color: var(--tile); letter-spacing: .06em; }
.work h3 { font-size: 18px; }
.work h3 a { color: var(--text); text-decoration: none; }
.work h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); } /* カード全体をクリック可能に */
.work h3 a:focus-visible { outline: none; }
.work:has(h3 a:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.work p { color: var(--muted); font-size: 14px; line-height: 1.75; flex: 1; }
.work-foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--tile); padding-top: 4px; }
.work-foot .icon { transition: transform .18s; }
.work:hover .work-foot .icon { transform: translate(2px, -2px); }
.empty { display: none; text-align: center; color: var(--muted); padding: 40px 0; }
[hidden] { display: none !important; }

/* LINEスタンプ / About */
.duo { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.sticker { display: flex; align-items: center; gap: 24px; padding: 26px; background: linear-gradient(135deg, var(--c-life-soft), var(--surface) 70%); }
.sticker img { width: 140px; height: 140px; object-fit: contain; border-radius: 22px; background: #fff; padding: 6px; box-shadow: var(--shadow); rotate: -4deg; }
.sticker h3, .about h3 { font-size: 22px; margin: 6px 0 8px; }
.sticker p, .about p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.about { padding: 26px; }

/* ---------- 6. ツールページ ---------- */
.breadcrumb { padding: 20px 0 0; font-size: 13px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }

.tool-hero { display: flex; align-items: center; gap: 20px; padding: 22px 0 28px; }
.tool-hero .tile { width: 72px; height: 72px; border-radius: 22px; }
.tool-hero .tile .icon { width: 36px; height: 36px; }
.tool-hero h1 { font-size: clamp(26px, 3.6vw, 36px); }
.tool-hero p { color: var(--muted); margin-top: 4px; }
.tool-hero .hero-chips { margin: 12px 0 0; }

.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.panel { padding: 24px; }
.panel + .panel { margin-top: 16px; }
.panel-title { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 16px; }
.step { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font: 700 14px/1 var(--font-body); flex: none; }
.hint { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.7; }
.field-label { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; margin-bottom: 8px; }

/* チェックカード */
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.check-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color .15s, background-color .15s; }
.check-card:hover { border-color: var(--brand); }
.check-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.check-card input { width: 18px; height: 18px; margin: 0; }
.check-card b { display: block; font-size: 14px; }
.check-card small { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }

/* 入力 */
.input, .range-num { height: 44px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text); padding: 0 14px; font: 15px var(--font-mono); width: 100%; }
.input:focus, .range-num:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); background: var(--surface); }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type="range"] { flex: 1; height: 6px; }
.range-num { width: 84px; text-align: center; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.preset { font: 600 13px/1 var(--font-body); padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.preset:hover { border-color: var(--brand); }
.preset[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.opts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 14px; }
.opts label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* 強度メーター */
.meter { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.meter-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.meter-head b { color: var(--meter-color, var(--ok)); }
.meter-bar { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.meter-bar span { display: block; height: 100%; width: var(--meter, 60%); border-radius: inherit; background: var(--meter-color, var(--ok)); transition: width .3s; }

/* 結果（右カラム・追従） */
.result { position: sticky; top: 84px; }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 380px; overflow: auto; }
.result-item { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.result-item code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 15px/1.5 var(--font-mono); cursor: pointer; }
.copy-btn { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 700 12px var(--font-body); cursor: pointer; }
.copy-btn:hover { border-color: var(--brand); color: var(--brand); }
.copy-btn.done { background: var(--c-life-soft); color: var(--c-life); border-color: transparent; }
.result-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* 注意事項 */
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tip { padding: 20px; }
.tip .tile { width: 42px; height: 42px; border-radius: 13px; margin-bottom: 12px; }
.tip .tile .icon { width: 22px; height: 22px; }
.tip h3 { font-size: 16px; margin-bottom: 6px; }
.tip p { font-size: 13.5px; color: var(--muted); line-height: 1.75; }

/* 関連ツール（小さめカード） */
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related .work { padding: 18px; flex-direction: row; align-items: center; gap: 14px; }
.related .work p, .related .work-badges, .related .work-foot { display: none; }
.related .work h3 { font-size: 16px; }

/* トースト */
.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 20px; opacity: 0; pointer-events: none; padding: 10px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 700; font-size: 14px; transition: opacity .2s, translate .2s; z-index: 100; }
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- 7. レスポンシブ ---------- */
@media (max-width: 900px) {
  .tool-layout { grid-template-columns: 1fr; }
  .result { position: static; }
  .tips, .related { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .hero-inner, .duo, .footer-inner { grid-template-columns: 1fr; }
  .hero { padding-top: 28px; }
  .hero-visual { max-width: 240px; grid-row: 1; }
  .hero-bubble { left: auto; right: -10%; bottom: 4%; }
  .header-inner { flex-wrap: wrap; gap: 0; padding-top: 10px; }
  .site-nav { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 40px); margin: 6px -20px 0; padding: 0 20px 10px; scrollbar-width: none; }
  .site-nav a { white-space: nowrap; padding: 6px 12px; }
  .two-col, .tips, .related { grid-template-columns: 1fr; }
  .tool-hero { align-items: flex-start; }
  .tool-hero .tile { width: 56px; height: 56px; border-radius: 18px; }
  .sticker { flex-direction: column; text-align: center; }
  .search { flex-basis: 100%; }
}

/* ---------- 8. 読み物ページ（プライバシーなど） ---------- */
.legal { max-width: 760px; margin: 24px auto 0; padding: clamp(24px, 5vw, 48px); }
.legal h1 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 16px; }
.legal h2 { font-size: 19px; margin: 32px 0 8px; padding-left: 12px; border-left: 4px solid var(--honey); }
.legal p { color: var(--muted); }
.legal-date { margin: 32px 0 20px; font-size: 13px; }


/* ---------- 9. ガイド記事・運営者情報・お問い合わせ ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.guide-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 22px; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.guide-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.guide-cat { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--tile-soft, var(--brand-soft)); color: var(--tile, var(--brand)); }
.guide-read { font-size: 12px; color: var(--muted); font-weight: 600; }
.guide-card h3 { font-size: 18px; line-height: 1.45; }
.guide-card h3 a { color: var(--text); text-decoration: none; }
.guide-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.guide-card h3 a:focus-visible { outline: none; }
.guide-card:has(h3 a:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.guide-card p { color: var(--muted); font-size: 14px; line-height: 1.75; flex: 1; }
.guide-card-foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--brand); padding-top: 4px; }
.guide-card-foot .icon { transition: transform .18s; }
.guide-card:hover .guide-card-foot .icon { transform: translate(2px, -2px); }

.article-wrap { max-width: 780px; margin: 20px auto 0; }
.article-card { padding: clamp(24px, 5vw, 44px); }
.article-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.article-header h1 { font-size: clamp(24px, 3.8vw, 34px); line-height: 1.35; margin: 10px 0 14px; }
.article-lead { color: var(--muted); font-size: 15.5px; line-height: 1.85; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 13px; color: var(--muted); margin-top: 14px; }

.article-toc { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 28px; }
.article-toc h2 { font-size: 15px; margin-bottom: 10px; color: var(--text); }
.article-toc ol, .article-toc ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.article-toc a { text-decoration: none; font-weight: 600; }
.article-toc a:hover { text-decoration: underline; }

.article-body { display: grid; gap: 16px; color: var(--text); font-size: 15.5px; line-height: 1.9; }
.article-body h2 { font-size: clamp(20px, 2.8vw, 24px); margin: 24px 0 4px; padding: 8px 0 8px 14px; border-left: 4px solid var(--brand); background: linear-gradient(90deg, var(--surface-2), transparent); border-radius: 0 10px 10px 0; }
.article-body h3 { font-size: 17.5px; margin: 14px 0 2px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.article-body h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--honey); flex: none; }
.article-body p { color: var(--text); }
.article-body ul, .article-body ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.article-body li { line-height: 1.8; }
.article-body blockquote { margin: 6px 0; padding: 14px 18px; border-left: 4px solid var(--honey); background: var(--surface-2); border-radius: 0 12px 12px 0; color: var(--muted); font-size: 14.5px; }
.article-body code { font-family: var(--font-mono); font-size: 0.9em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }

.article-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; margin: 6px 0; background: var(--surface); }
.article-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.article-table th, .article-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.65; }
.article-table th { background: var(--surface-2); font-weight: 700; color: var(--text); white-space: nowrap; }
.article-table tr:last-child td { border-bottom: 0; }

.article-callout { padding: 16px 20px; border-radius: var(--radius); background: var(--honey-soft); border: 1px solid color-mix(in srgb, var(--honey) 35%, var(--border)); display: grid; gap: 6px; margin: 6px 0; }
.article-callout.info { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.article-callout strong { font-family: var(--font-round); font-size: 15px; color: var(--text); }
.article-callout p { font-size: 14px; color: var(--text); line-height: 1.75; }

.article-cta { margin: 24px 0 8px; padding: 22px 24px; border-radius: var(--radius); background: linear-gradient(135deg, var(--brand-soft), var(--surface-2)); border: 1.5px solid color-mix(in srgb, var(--brand) 35%, var(--border)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.article-cta h3 { font-size: 18px; margin-bottom: 4px; color: var(--text); }
.article-cta p { font-size: 14px; color: var(--muted); max-width: 46ch; }

.contact-box { width: 100%; border-collapse: collapse; margin: 16px 0 24px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: block; }
.contact-box table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.contact-box th, .contact-box td { padding: 13px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.contact-box th { width: 30%; min-width: 140px; background: var(--surface-2); color: var(--text); font-weight: 700; }
.contact-box td { color: var(--muted); }
.contact-box tr:last-child th, .contact-box tr:last-child td { border-bottom: 0; }

@media (max-width: 600px) {
  .article-card { padding: 20px; }
  .contact-box th, .contact-box td { display: block; width: 100%; }
  .contact-box th { border-bottom: 0; padding-bottom: 4px; }
}
