html { scroll-behavior: smooth; scroll-padding-top: 85px; }
:root {
    --c-bg: #faf9f5;
    --c-fg: #1a1a1a;
    --c-fg-sub: #555;
    --c-fg-mute: #888;
    --c-border: #e5e3dc;
    --c-accent: #c9a96e;
    --c-accent-dark: #a8884d;
    --c-primary: #1f3a5f;
    --c-primary-dark: #142a47;
    --c-success: #2d7a4a;
    --c-warn: #b06820;
    --c-card-bg: #ffffff;
    --c-soft: #f2efe7;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --radius: 6px;
    --radius-lg: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, system-ui, sans-serif;
    background: var(--c-bg);
    color: var(--c-fg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-accent-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
/* 事業計画ページ(plan)はテーブルが横長なのでPCで横幅を広げる */
.container.plan-wide { max-width: 1400px; }
/* インライン注記をたたむツールチップ(ⓘ にhoverで即・吹き出し表示) */
.tip { position: relative; cursor: help; color: #64748b; font-weight: 600; white-space: nowrap; }
.tip svg { width: 14px; height: 14px; vertical-align: -2px; }
/* plan ページの表はツールチップが切れないよう overflow を解放 */
.plan-wide .data-table { overflow: visible; }
/* ツールチップは JS で body 直下に position:fixed 表示する。
   table-scroll の overflow でクリップされず、全文が最前面に出る。 */
#js-tip {
    position: fixed; z-index: 9999; display: none;
    max-width: 460px; white-space: normal;
    background: #1f2937; color: #fff; text-align: left;
    padding: 12px 15px; border-radius: 8px;
    font-size: 14px; font-weight: 400; line-height: 1.8;
    box-shadow: 0 8px 24px rgba(0,0,0,.32);
    pointer-events: none;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand-logo {
    width: 40px; height: 40px;
    background: var(--c-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700;
    border-radius: var(--radius);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 18px; font-weight: 700; color: var(--c-fg); }
.brand-sub { font-size: 10px; color: var(--c-fg-mute); letter-spacing: 0.1em; }
.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a { color: var(--c-fg); font-size: 15px; }
.site-nav a:hover { color: var(--c-accent-dark); text-decoration: none; }
.nav-cta {
    background: var(--c-accent); color: #fff !important;
    padding: 9px 18px; border-radius: var(--radius);
    font-weight: 600;
}
.nav-cta:hover { background: var(--c-accent-dark); }

/* Main */
.site-main { min-height: calc(100vh - 280px); }

/* Hero */
.hero {
    background: linear-gradient(135deg, #1f3a5f 0%, #2d4f7a 100%);
    color: #fff;
    padding: 96px 0 80px;
}
.hero-inner { max-width: 920px; margin: 0 auto; padding: 0 20px; }
.hero-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    color: var(--c-accent);
    padding: 6px 14px; border-radius: 999px;
    font-size: 12px; letter-spacing: 0.15em; margin-bottom: 22px;
}
.hero h1 { font-size: 44px; line-height: 1.3; margin: 0 0 22px; font-weight: 700; }
.hero h1 .accent { color: var(--c-accent); }
.hero-lead { font-size: 18px; opacity: 0.92; margin-bottom: 32px; max-width: 760px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 14px 28px; border-radius: var(--radius);
    font-weight: 600; font-size: 15px;
    text-align: center; cursor: pointer; border: none;
    transition: all 0.15s;
}
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-dark); text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.1); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--c-primary); color: #fff; }
.btn-secondary:hover { background: var(--c-primary-dark); text-decoration: none; color: #fff; }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: #fff; }
.section-soft { background: var(--c-soft); }
.section-title {
    font-size: 30px; margin: 0 0 14px;
    text-align: center; font-weight: 700;
}
.section-lead {
    text-align: center; color: var(--c-fg-sub);
    max-width: 700px; margin: 0 auto 48px;
}

/* Three pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pillar {
    background: #fff; padding: 32px 28px; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--c-border);
}
.pillar-num {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--c-accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; margin-bottom: 18px;
}
.pillar h3 { margin: 0 0 12px; font-size: 20px; }
.pillar p { margin: 0 0 14px; color: var(--c-fg-sub); }
.pillar-links { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* Partners (3社) */
.partners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.partner-card {
    text-align: center; background: #fff;
    padding: 28px 20px; border-radius: var(--radius-lg);
    border: 1px solid var(--c-border);
}
.partner-icon {
    width: 56px; height: 56px; margin: 0 auto 14px;
    background: var(--c-soft); color: var(--c-primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700;
}
.partner-card h4 { margin: 0 0 6px; font-size: 16px; }
.partner-card p { margin: 0; font-size: 13px; color: var(--c-fg-sub); }

/* Persona pills */
.pills { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 16px; }
.pill {
    background: #fff; border: 1px solid var(--c-border);
    padding: 10px 18px; border-radius: 999px;
    font-size: 14px; color: var(--c-fg);
}
.pill:hover { border-color: var(--c-accent); color: var(--c-accent-dark); text-decoration: none; }

/* Page title bar */
.page-title-bar {
    background: #fff; border-bottom: 1px solid var(--c-border);
    padding: 32px 0 28px;
}
.breadcrumbs { font-size: 13px; color: var(--c-fg-mute); margin-bottom: 12px; }
.breadcrumbs a { color: var(--c-fg-sub); }
.page-title-bar h1 { margin: 0 0 8px; font-size: 30px; font-weight: 700; }
.page-title-bar .lead { margin: 0; color: var(--c-fg-sub); max-width: 760px; }

/* Article content */
.article { padding: 48px 0 72px; }
.article-grid { display: grid; grid-template-columns: 1fr 280px; gap: 40px; align-items: start; }
.article-body h2 {
    font-size: 24px; margin: 40px 0 18px;
    padding-bottom: 10px; border-bottom: 2px solid var(--c-accent);
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3,
.article h3 { font-size: 18px; margin: 28px 0 12px; font-weight: 700; padding-bottom: 6px; border-bottom: 2px solid #9aa5b4; }
.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 24px; }
.article-body li { margin-bottom: 6px; }

/* Data table */
.data-table {
    width: 100%; border-collapse: collapse;
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); margin: 18px 0 24px;
}
.data-table th, .data-table td {
    padding: 12px 14px; text-align: left;
    border-bottom: 1px solid var(--c-border); font-size: 14px;
}
.data-table th { background: var(--c-soft); font-weight: 600; }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafaf7; }
.data-table tr.row-hl td { background: #fff7e8; }

/* Data card (summary stats) */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 0 32px; }
.stat-card {
    background: #fff; padding: 22px 18px; border-radius: var(--radius-lg);
    border: 1px solid var(--c-border); text-align: center;
}
.stat-label { font-size: 12px; color: var(--c-fg-mute); margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--c-primary); line-height: 1.1; }
.stat-unit { font-size: 12px; color: var(--c-fg-mute); margin-left: 2px; }

/* Property cards */
.property-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 16px 0 24px; }
.property-card {
    background: #fff; border: 1px solid var(--c-border);
    border-radius: var(--radius-lg); padding: 20px; transition: transform 0.1s;
}
.property-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.property-badge {
    display: inline-block; background: var(--c-warn); color: #fff;
    font-size: 10px; padding: 3px 8px; border-radius: 3px; margin-bottom: 8px;
}
.property-title { font-size: 17px; font-weight: 700; margin: 0 0 10px; color: var(--c-fg); }
.property-meta { font-size: 13px; color: var(--c-fg-sub); margin-bottom: 12px; }
.property-rent { font-size: 22px; font-weight: 700; color: var(--c-accent-dark); margin-bottom: 8px; }
.property-rent .yen-suffix { font-size: 12px; color: var(--c-fg-sub); font-weight: 400; }
.property-features { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.property-features .tag {
    background: var(--c-soft); padding: 3px 8px; border-radius: 3px;
    font-size: 11px; color: var(--c-fg-sub);
}

/* Sidebar */
.sidebar { position: sticky; top: 88px; }
.sidebar-block {
    background: #fff; border: 1px solid var(--c-border);
    border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
}
.sidebar-heading {
    font-size: 14px; font-weight: 700; margin: 0 0 12px;
    padding-bottom: 8px; border-bottom: 1px solid var(--c-border);
}
.sidebar-block ul { margin: 0; padding-left: 18px; font-size: 13px; }
.sidebar-cta {
    background: linear-gradient(135deg, #c9a96e, #a8884d);
    color: #fff; padding: 24px 20px; border-radius: var(--radius-lg);
    text-align: center;
}
.sidebar-cta h4 { margin: 0 0 10px; font-size: 16px; color: #fff; }
.sidebar-cta p { margin: 0 0 14px; font-size: 13px; opacity: 0.95; }
.sidebar-cta .btn { background: #fff; color: var(--c-accent-dark); display: block; padding: 12px; }
.sidebar-cta .btn:hover { background: rgba(255,255,255,0.92); }

/* Related links grid */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.related-card {
    background: #fff; padding: 14px 16px; border: 1px solid var(--c-border);
    border-radius: var(--radius); font-size: 14px;
}
.related-card:hover { border-color: var(--c-accent); }

/* Source note */
.source-note {
    background: var(--c-soft); padding: 14px 18px;
    border-radius: var(--radius); font-size: 12px; color: var(--c-fg-sub);
    margin: 24px 0;
}
.source-note-warn { background: #fff4e5; color: #8a5300; }

/* Contact form */
.contact-form { background: #fff; padding: 32px; border-radius: var(--radius-lg); border: 1px solid var(--c-border); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-group .required { color: #c44; margin-left: 4px; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--c-border);
    border-radius: var(--radius); font-size: 15px; font-family: inherit;
    background: #fff;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group .help { font-size: 12px; color: var(--c-fg-mute); margin-top: 4px; }
.form-radio-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.form-radio-option {
    display: flex; align-items: flex-start; gap: 10px;
    background: var(--c-bg); padding: 14px;
    border: 2px solid var(--c-border); border-radius: var(--radius);
    cursor: pointer;
}
.form-radio-option:hover { border-color: var(--c-accent); }
.form-radio-option input { margin-top: 3px; }
.form-radio-option .opt-title { font-weight: 600; font-size: 14px; display: block; margin-bottom: 2px; }
.form-radio-option .opt-desc { font-size: 12px; color: var(--c-fg-sub); }

/* Toast */
.toast-stack { position: fixed; bottom: 24px; right: 24px; z-index: 10000; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: var(--c-primary); color: #fff;
    padding: 12px 18px; border-radius: var(--radius);
    box-shadow: var(--shadow-md); font-size: 14px;
}
.toast.toast-success { background: var(--c-success); }
.toast.toast-error { background: #c44; }

/* Wide content (no sidebar) */
.article-body-wide { max-width: none; width: 100%; }

/* Keywords list page */
.kw-vol { font-size: 10px; padding: 2px 6px; border-radius: 3px; font-weight: 600; display: inline-block; min-width: 44px; text-align: center; color: #fff; }
.kw-vol-mega { background: #c44; }
.kw-vol-high { background: #d68920; }
.kw-vol-mid  { background: #1f3a5f; }
.kw-vol-low  { background: #888; }
.kw-vol-tail { background: #bbb; }
.kw-vol-niche { background: #2e7d52; }
.kw-page { font-size: 10px; padding: 2px 6px; border-radius: 3px; font-weight: 600; display: inline-block; min-width: 48px; text-align: center; }
.kw-page-live { background: #e6f4ea; color: #1e7e34; border: 1px solid #b7dfc2; }
.kw-page-plan { background: #fff4e5; color: #b06a00; border: 1px solid #f0d4a8; }
.kw-table { font-size: 13px; }
.kw-table td { vertical-align: middle; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .data-table { margin: 0 0 4px; }
.kpi-table th:first-child, .kpi-table td:first-child { min-width: 155px; white-space: normal; }
.kw-table td.num { white-space: nowrap; text-align: right; }
.kw-table .num .note-text { display: block; margin: 2px 0 0; font-size: 0.75em; line-height: 1.2; }
.kw-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 32px; }
.kw-summary-card { background: #fff; padding: 16px; border-radius: 6px; text-align: center; border: 1px solid var(--c-border); }
.kw-summary-num { font-size: 22px; font-weight: 700; color: var(--c-primary); }
.kw-summary-label { font-size: 11px; color: var(--c-fg-mute); }
.kw-toc { background: #fff; padding: 18px 22px; border-radius: 6px; border: 1px solid var(--c-border); margin-bottom: 32px; }
.kw-toc a { display: inline-block; padding: 4px 10px; margin: 2px; background: var(--c-soft); border-radius: 3px; font-size: 13px; }

/* Responsive */
@media (max-width: 768px) {
    .header-inner { height: 56px; }
    .site-nav { gap: 12px; }
    .site-nav a { font-size: 13px; }
    .nav-cta { padding: 7px 12px; }
    .brand-sub { display: none; }
    .hero { padding: 56px 0 48px; }
    .hero h1 { font-size: 30px; }
    .hero-lead { font-size: 16px; }
    .section { padding: 48px 0; }
    .pillars, .partners, .property-grid, .related-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .article-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .form-radio-group { grid-template-columns: 1fr; }
}

/* ===== 店舗系(naiso/kaigyo)テンプレ用 ===== */
.btn:not(.btn-outline):not(.btn-secondary):not(.btn-ghost) { background: var(--c-accent); color: #fff; }
.btn-ghost { background: #fff; color: var(--c-primary); border: 1.5px solid var(--c-border); }
.btn-ghost:hover { background: var(--c-soft); text-decoration: none; color: var(--c-primary); }
.cta-box {
    background: var(--c-soft); border: 1px solid var(--c-border);
    border-radius: var(--radius); padding: 24px 26px; margin: 32px 0;
}
.cta-box h3 { margin: 0 0 8px; color: var(--c-primary); }
.cta-box p { margin: 0 0 16px; color: var(--c-fg-sub); font-size: 14px; }
.cta-box .btn { margin: 0 8px 8px 0; }
.faq-list { margin: 16px 0; }
.faq-list dt { font-weight: 700; color: var(--c-primary); margin-top: 16px; }
.faq-list dd { margin: 6px 0 0; color: var(--c-fg-sub); font-size: 14px; line-height: 1.8; }
.note-text { font-size: 12px; color: var(--c-fg-mute); margin: 8px 0 24px; }
.stat-value-sm { font-size: 20px; }
.row-total { font-weight: 700; background: var(--c-soft); }
.section-sep { border: none; border-top: 3px double var(--c-accent); margin: 48px 0 8px; }

/* ===== Footer ===== */
.site-footer { background: #16263f; color: #cdd5e0; margin-top: 64px; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: 28px; }
.footer-brand { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-desc { font-size: 12px; line-height: 1.8; color: #9fb0c4; }
.footer-heading { font-size: 13px; font-weight: 700; color: #c9a96e; margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #cdd5e0; font-size: 13px; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
    margin-top: 36px; padding-top: 20px; border-top: 1px solid #2a3c57;
    display: flex; flex-direction: column; gap: 6px;
}
.footer-bottom small { font-size: 11px; color: #8497ad; }
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}

/* ===== /plan/ 1カラム + 目次右上ボックス ===== */
.plan-toc-box {
    position: fixed;
    top: 88px;
    right: 20px;
    width: 220px;
    max-height: calc(100vh - 108px);
    overflow-y: auto;
    background: #f8f9fb;
    border: 1px solid #e0e4ea;
    border-radius: 8px;
    padding: 16px 18px;
    font-size: 13px;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.plan-toc-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--c-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.toc-title-icon { flex-shrink: 0; color: var(--c-fg-mute); }
.toc-title-label { display: flex; align-items: center; gap: 6px; }
.plan-toc-box ul {
    margin: 0 0 8px;
    padding-left: 0;
    list-style: none;
}
.plan-toc-box li {
    margin-bottom: 4px;
}
.plan-toc-box a {
    color: var(--c-primary);
    text-decoration: none;
    font-size: 12px;
}
.plan-toc-box a:hover { text-decoration: underline; }
.plan-toc-stats {
    background: #fff;
    border: 1px solid #e0e4ea;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 12px;
    line-height: 1.7;
    font-size: 12px;
}
.plan-toc-cta {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}
.plan-clearfix { clear: both; }
@media (max-width: 768px) {
    .plan-toc-box { position: static; width: auto; margin: 0 0 20px 0; max-height: none; box-shadow: none; } .container.plan-wide { padding-right: 16px; }
}

/* TOC collapse */
.toc-toggle { background: none; border: none; cursor: pointer; color: var(--c-fg-mute); padding: 0 2px; line-height: 1; transition: transform .2s; display: flex; align-items: center; flex-shrink: 0; }
.plan-toc-box.toc-collapsed .toc-toggle { transform: rotate(180deg); }
.plan-toc-box.toc-collapsed ul,
.plan-toc-box.toc-collapsed .plan-toc-cta,
.plan-toc-box.toc-collapsed .plan-toc-stats { display: none; }
.plan-toc-box.toc-collapsed { padding: 10px 14px; width: fit-content; min-width: 0; }
.plan-toc-box.toc-collapsed .plan-toc-title { margin-bottom: 0; }
.plan-toc-box a.toc-active { font-weight: 700; color: var(--c-text); }
