/* ============================================================
   県データ v2 — 県トップ下部の「島」と専用ページ(/{pref}/data/)
   /assets/area-data.css
   2026-09-25 デザイン刷新（生成り地 × 深緑アクセント。モック準拠）
   黒×金のサイトの中で、データのコーナーだけ明るい島として置く。
   接頭辞は ad-（area data）。旧 .ap-st* のカード部品は使わない。
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@700;900&family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* ---------- トークン ---------- */
.ad {
    --ad-bg: #F6F3EE;
    --ad-card: #FFFFFF;
    --ad-line: #E4DED5;
    --ad-track: #EFEBE5;
    --ad-text: #1F1A17;
    --ad-text2: #3D3632;
    --ad-muted: #5E5750;
    --ad-accent: #0F5F59;
    --ad-accent-dark: #0A4541;
    --ad-t1: #CFE3E0;
    --ad-t2: #8FC3BD;
    --ad-t3: #3F948C;
    --ad-callout: #E6F1EF;
    --ad-heat0: #EDEAE4;
    --ad-ink: #1F1A17;
    --ad-ink-text: #F6F3EE;
    --ad-ink-muted: #D9D2C8;
    --ad-sat: #2F5AA8;
    --ad-sun: #B23A2A;
    --ad-font: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
    --ad-display: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
    font-family: var(--ad-font);
    color: var(--ad-text);
    line-height: 1.6;
}

.ad a {
    color: var(--ad-accent);
}

.ad a:hover {
    color: var(--ad-accent-dark);
}

.ad b {
    font-weight: 700;
}

/* ---------- 島（県トップ下部） ---------- */
.ad-island {
    background: var(--ad-bg);
    border-radius: 1.8rem;
    padding: 2.8rem 2.8rem 2.6rem;
}

.ad-island__top {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    margin-bottom: 2rem;
}

.ad-island__lead {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.ad-island .ad-cta {
    margin-top: 2rem;
}

.ad-island .ad-cta-note {
    display: block;
    margin-top: 0.8rem;
    text-align: center;
}

@media (max-width: 767px) {
    .ad-island {
        margin: 0 1.2rem;
        border-radius: 1.8rem;
        padding: 2rem 1.6rem 2.2rem;
    }

    .ad-island__top {
        gap: 1.2rem;
        margin-bottom: 1.6rem;
    }

    .ad-island .ad-cta {
        margin-top: 1.6rem;
    }
}

/* ---------- 見出し・文章 ---------- */
.ad-title {
    margin: 0;
    font-family: var(--ad-display);
    font-size: 2.6rem;
    overflow-wrap: anywhere;
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: 0.01em;
    color: var(--ad-text);
}

.ad-title--h1 {
    font-size: 3.8rem;
}

.ad-intro {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--ad-text2);
}

.ad-intro b {
    color: var(--ad-text);
}

.ad-callout {
    padding: 1.4rem 1.6rem;
    background: var(--ad-callout);
    border-radius: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ad-callout__label {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ad-accent-dark);
}

.ad-callout__body {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.7;
    color: var(--ad-text);
}

.ad-callout__body p {
    margin: 0 0 0.6em;
}

.ad-callout__body p:last-child {
    margin-bottom: 0;
}

.ad-callout__big {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ad-text);
}

.ad-callout__sub {
    font-size: 1.2rem;
    color: var(--ad-text2);
}

.ad a.ad-cta,
.ad-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.4rem;
    background: var(--ad-ink);
    color: var(--ad-ink-text);
    border-radius: 1.2rem;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
}

.ad a.ad-cta:hover,
.ad-cta:hover {
    color: var(--ad-ink-text);
    background: #2C2622;
}

.ad-cta .bi {
    font-size: 1.4rem;
}

.ad-cta-note {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--ad-muted);
}

.ad-link {
    font-size: 1.3rem;
    font-weight: 500;
    text-decoration: none;
}

.ad-link:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .ad-title {
        font-size: 2.2rem;
    }

    .ad-title--h1 {
        font-size: 2.6rem;
    }

    .ad-cta-note {
        text-align: center;
    }
}

/* ---------- カード ---------- */
.ad-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    align-content: start;
}

.ad-cards--1 {
    grid-template-columns: 1fr;
}

.ad-card {
    padding: 1.6rem 1.8rem;
    background: var(--ad-card);
    border: 1px solid var(--ad-line);
    border-radius: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    min-width: 0;
}

.ad-card--wide {
    grid-column: 1 / -1;
}

.ad-card--dashed {
    border-style: dashed;
    border-color: #C9C0B4;
}

.ad-card__head {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ad-card__title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ad-text);
}

.ad-card__sub {
    margin: 0;
    font-size: 1.1rem;
    color: var(--ad-muted);
}

.ad-card__note {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--ad-muted);
}

.ad-card__text {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--ad-text2);
}

.ad-card__row {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.ad-card__row .ad-card__head {
    flex-grow: 1;
}

@media (max-width: 767px) {
    .ad-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ad-card {
        padding: 1.6rem;
    }
}

/* ---------- 大きな数字 ---------- */
.ad-big {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.ad-big__num {
    font-family: var(--ad-display);
    font-size: 3.6rem;
    font-weight: 900;
    line-height: 1;
    color: var(--ad-accent);
}

.ad-big__num--ink {
    color: var(--ad-text);
}

.ad-big__unit {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ad-text);
}

.ad-big__pre {
    font-size: 1.3rem;
    color: var(--ad-muted);
}

/* ---------- 横バー（点数帯・年齢層・リード時間・リピート） ---------- */
.ad-bands {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ad-band {
    display: grid;
    grid-template-columns: 5.6rem minmax(0, 1fr) 4rem;
    gap: 0.8rem;
    align-items: center;
}

.ad-band--wide-label {
    grid-template-columns: 7.2rem minmax(0, 1fr) 4rem;
}

.ad-band__label {
    font-size: 1.2rem;
    color: var(--ad-text2);
}

.ad-band__track {
    height: 0.8rem;
    background: var(--ad-track);
    border-radius: 999px;
    overflow: hidden;
}

.ad-band__fill {
    display: block;
    height: 100%;
    background: var(--ad-t2);
    border-radius: 999px;
}

.ad-band__fill--top {
    background: var(--ad-accent);
}

.ad-band__pct {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---------- ランキング（駅） ---------- */
.ad-rank {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.ad-rank__item {
    display: grid;
    grid-template-columns: 2.2rem minmax(0, 1fr) 4.8rem;
    gap: 1rem;
    align-items: center;
}

.ad-rank__no {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    font-family: var(--ad-display);
    font-size: 1.2rem;
    font-weight: 900;
    background: var(--ad-track);
    color: var(--ad-text2);
}

.ad-rank__no--top {
    background: var(--ad-accent);
    color: #FFFFFF;
}

.ad-rank__body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.ad-rank__name {
    font-size: 1.4rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-rank__track {
    height: 0.8rem;
    background: var(--ad-track);
    border-radius: 999px;
    overflow: hidden;
}

.ad-rank__fill {
    display: block;
    height: 100%;
    background: var(--ad-t2);
    border-radius: 999px;
}

.ad-rank__fill--top {
    background: var(--ad-accent);
}

.ad-rank__count {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---------- 相場（帯＋点） ---------- */
.ad-price {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.ad-price__row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ad-price__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.ad-price__dur {
    font-size: 1.3rem;
    font-weight: 700;
}

.ad-price__median {
    font-size: 1.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ad-price__median small {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--ad-muted);
}

.ad-price__track {
    position: relative;
    height: 1rem;
    background: var(--ad-track);
    border-radius: 999px;
}

.ad-price__band {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--ad-t2);
    border-radius: 999px;
}

.ad-price__dot {
    position: absolute;
    top: -0.3rem;
    width: 1.6rem;
    height: 1.6rem;
    margin-left: -0.8rem;
    background: var(--ad-accent);
    border: 2px solid #FFFFFF;
    border-radius: 999px;
    box-sizing: border-box;
}

.ad-price__range {
    font-size: 1.1rem;
    color: var(--ad-muted);
}

.ad-price__axis {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: var(--ad-muted);
    border-top: 1px solid var(--ad-track);
    padding-top: 0.8rem;
}

.ad-minmax {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1rem 1.2rem;
    background: var(--ad-bg);
    border-radius: 1rem;
    font-size: 1.2rem;
}

.ad-minmax__val {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ---------- 積み上げバー（業種別・コース時間） ---------- */
.ad-stack {
    display: flex;
    height: 2.8rem;
    border-radius: 0.8rem;
    overflow: hidden;
    gap: 2px;
    background: var(--ad-track);
}

.ad-stack__seg {
    display: block;
    height: 100%;
}

.ad-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 1.2rem;
}

.ad-legend--col {
    grid-template-columns: 1fr;
}

.ad-legend__item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.ad-legend__chip {
    display: block;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 0.3rem;
    flex: 0 0 auto;
}

.ad-legend__label {
    font-size: 1.2rem;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-legend__pct {
    font-size: 1.4rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* 色は並び順（多い順）で 4 段。5つ目以降は最後の色 */
.ad-stack__seg.-c0,
.ad-legend__chip.-c0 {
    background: var(--ad-accent);
}

.ad-stack__seg.-c1,
.ad-legend__chip.-c1 {
    background: var(--ad-t3);
}

.ad-stack__seg.-c2,
.ad-legend__chip.-c2 {
    background: var(--ad-t2);
}

.ad-stack__seg.-c3,
.ad-legend__chip.-c3,
.ad-stack__seg.-c4,
.ad-legend__chip.-c4 {
    background: var(--ad-t1);
}

@media (max-width: 767px) {
    .ad-legend--col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- ヒートマップ ---------- */
.ad-heat {
    display: grid;
    grid-template-columns: 2.4rem repeat(var(--ad-heat-cols, 10), minmax(0, 1fr));
    gap: 0.3rem;
}

.ad-heat__corner {
    grid-column: 1;
}

.ad-heat__col {
    font-size: 1rem;
    color: var(--ad-muted);
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
}

.ad-heat__row {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ad-text);
}

.ad-heat__row--sat {
    color: var(--ad-sat);
}

.ad-heat__row--sun {
    color: var(--ad-sun);
}

.ad-heat__cell {
    display: block;
    height: 3rem;
    border-radius: 0.5rem;
    background: var(--ad-heat0);
}

.ad-heat__cell.-l1 {
    background: var(--ad-t1);
}

.ad-heat__cell.-l2 {
    background: var(--ad-t2);
}

.ad-heat__cell.-l3 {
    background: var(--ad-t3);
}

.ad-heat__cell.-l4 {
    background: var(--ad-accent);
}

.ad-heat__legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.1rem;
    color: var(--ad-muted);
}

.ad-heat__legend-swatches {
    display: flex;
    gap: 0.3rem;
}

.ad-heat__legend .ad-heat__cell {
    width: 1.8rem;
    height: 1.2rem;
    border-radius: 0.3rem;
}

@media (max-width: 767px) {
    .ad-heat__cell {
        height: 2.6rem;
    }

    .ad-heat__col {
        font-size: 0.9rem;
    }
}

/* ---------- データ蓄積中 ---------- */
.ad-pending {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 8rem;
    border: 1px dashed #C9C0B4;
    border-radius: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--ad-muted);
}

/* ============================================================
   専用ページ（/{pref}/data/）
   ============================================================ */
.ad-page {
    background: var(--ad-bg);
    border-radius: 1.8rem;
    padding: 2.8rem 2.8rem 3.2rem;
    display: flex;
    flex-direction: column;
    gap: 3.2rem;
}

.ad-page__head {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-width: 68rem;
}

.ad-page__crumbs {
    display: flex;
    gap: 0.6rem;
    font-size: 1.2rem;
    color: var(--ad-muted);
}

.ad-page__crumbs a {
    color: var(--ad-muted);
    text-decoration: none;
}

.ad-page__crumbs a:hover {
    color: var(--ad-text);
}

.ad-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 48rem;
}

.ad-chip {
    padding: 1.2rem 1.4rem;
    background: var(--ad-card);
    border: 1px solid var(--ad-line);
    border-radius: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ad-chip__label {
    font-size: 1.2rem;
    color: var(--ad-muted);
}

.ad-chip__val {
    font-size: 1.6rem;
    font-weight: 700;
}

/* 部（第1部・第2部） */
.ad-part {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.ad-part__head {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ad-part__num {
    font-family: var(--ad-display);
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--ad-accent);
}

.ad-part__title {
    margin: 0;
    font-family: var(--ad-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ad-text);
}

.ad-part__sub {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--ad-muted);
}

/* 集計方法（濃い地） */
.ad-method {
    padding: 2.4rem 2.4rem 2.8rem;
    background: var(--ad-ink);
    color: var(--ad-ink-text);
    border-radius: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ad-method__title {
    margin: 0;
    font-family: var(--ad-display);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--ad-ink-text);
}

.ad-method__list {
    margin: 0;
    padding-left: 1.6rem;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--ad-ink-muted);
}

.ad-method__list li + li {
    margin-top: 0.2rem;
}

.ad-page__foot {
    display: flex;
    justify-content: center;
}

@media (max-width: 767px) {
    .ad-page {
        margin: 0 1.2rem;
        padding: 2rem 1.6rem 2.4rem;
        gap: 2.4rem;
    }

    .ad-chips {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.8rem;
    }

    .ad-chip {
        padding: 1rem;
    }

    .ad-chip__val {
        font-size: 1.4rem;
    }

    .ad-method {
        padding: 2rem 1.6rem 2.4rem;
    }
}
