/* =============================================================
 * 記事「タチウオが堤防で釣れない」: 投稿データのグラフ（.tc-*）
 * articles/tachiuo-teibou-tsurenai/chart.blade.php から1回だけ読み込む。
 * 色・書体は column.css の変数。白地・1px の線・角丸・影なし。文字は 12px 以上。
 * 動き: chart.js が .is-pre を付けたときだけ（見えたら外して棒が伸びる）。「動きを減らす」では動かさない。
 * ============================================================= */

.col-page .tc-fig {
    --tc-other: var(--col-navy);
    --tc-hi: var(--col-gold);
    --tc-boat: var(--col-aqua);
    --tc-base: rgba(14, 42, 61, .32);
    --tc-row: rgba(14, 42, 61, .07);
    --tc-hatch: repeating-linear-gradient(135deg, rgba(13, 79, 140, .30) 0 2px, rgba(13, 79, 140, .07) 2px 6px);
    --tc-ease: cubic-bezier(.3, .7, .2, 1);
    position: relative;
    margin-top: 1.8em;
    margin-bottom: 1.8em;
    padding: 18px 14px 16px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--col-ink);
    background: var(--col-surface);
    border: 1px solid var(--col-line);
    border-radius: var(--col-r-sm);
    text-wrap: pretty;
}
/* ワイド枠: column.css の .col-wide は狭い画面で左右に gutter ぶん狭くなるので、本文幅に戻す */
@supports (width: 1cqw) {
    .col-page .tc-fig.col-wide {
        margin-left: calc((100% - min(var(--col-wide), 100cqw)) / 2);
        margin-right: calc((100% - min(var(--col-wide), 100cqw)) / 2);
    }
}
@media (max-width: 767.98px) {
    .col-page .tc-fig.col-wide { margin-left: 0; margin-right: 0; }
}
@media (min-width: 768px) {
    .col-page .tc-fig { padding: 22px 22px 18px; }
}

/* 本文の ul/ol/li/table の飾りを打ち消す */
.col-page .tc-fig p,
.col-page .tc-fig ul,
.col-page .tc-fig ol,
.col-page .tc-fig li { margin: 0; padding: 0; list-style: none; border: 0; }
.col-page .col-body .tc-fig li + li,
.col-page .col-section .tc-fig li + li { margin-top: 0; }
.col-page .col-body .tc-fig ol,
.col-page .col-body .tc-fig ul { padding-left: 0; }
.col-page .col-body .tc-fig li::before,
.col-page .col-body .tc-fig li::marker { content: none; }
.col-page .tc-fig b,
.col-page .tc-fig strong { font-weight: 700; background: none; }

/* 見出し・キャプション */
.col-page .tc-fig .tc-fig__eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; line-height: 1.6; color: var(--col-navy); }
.col-page .tc-fig .tc-fig__title { margin-top: 2px; font-size: 19px; font-weight: 700; line-height: 1.5; color: var(--col-navy-800); font-feature-settings: "palt"; }
.col-page .tc-fig .tc-fig__title span { display: inline-block; }
.col-page .tc-fig .tc-fig__cap { margin-top: 14px; padding-top: 10px; font-size: 13.5px; line-height: 1.7; color: var(--col-ink-2); border-top: 1px solid var(--col-line); }
.col-page .tc-fig .tc-sub { font-size: 13px; font-weight: 700; line-height: 1.5; color: var(--col-ink-2); }

/* 凡例 */
.col-page .tc-fig .tc-legend { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 8px; font-size: 13px; line-height: 1.7; color: var(--col-ink-2); }
.col-page .tc-fig .tc-legend li { display: inline-flex; align-items: center; gap: 6px; }
.col-page .tc-fig .tc-sw { display: inline-block; flex: none; width: 14px; height: 10px; border-radius: 2px; background: var(--tc-other); }
.col-page .tc-fig .tc-sw--hi { background: var(--tc-hi); }
.col-page .tc-fig .tc-sw--low { background: var(--tc-hatch); box-shadow: inset 0 0 0 1px rgba(13, 79, 140, .35); }
.col-page .tc-fig .tc-sw--boat { background: var(--tc-boat); }

/* 切り替え（JS があるときだけ出る） */
.col-page .tc-fig .tc-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.col-page .tc-fig .tc-switch[hidden] { display: none; }
.col-page .tc-fig .tc-switch__btn {
    min-width: 0; min-height: 48px; margin: 0; padding: 6px 8px;
    font-family: inherit; font-size: 13.5px; font-weight: 700; line-height: 1.4; letter-spacing: 0; text-align: center;
    color: var(--col-navy); background: #fff;
    border: 1.5px solid rgba(13, 79, 140, .35); border-radius: var(--col-r-sm);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.col-page .tc-fig .tc-switch__btn span { display: inline-block; }
.col-page .tc-fig .tc-switch__btn:hover { border-color: var(--col-navy); }
.col-page .tc-fig .tc-switch__btn:focus-visible { outline: 3px solid rgba(76, 195, 240, .85); outline-offset: 2px; }
.col-page .tc-fig .tc-switch__btn[aria-pressed="true"] { color: #fff; background: var(--col-navy); border-color: var(--col-navy); }
.col-page .tc-fig .tc-lead { margin-top: 10px; font-size: 14.5px; line-height: 1.7; }
.col-page .tc-mon .tc-callout {
    margin-top: 10px; padding: 8px 12px;
    font-size: 15.5px; font-weight: 700; line-height: 1.6; color: var(--col-navy-800); font-feature-settings: "palt";
    background: var(--col-surface-2); border-left: 3px solid var(--col-gold); border-radius: 0 6px 6px 0;
}
.col-page .tc-mon .tc-callout b { font-size: 18px; color: var(--col-navy); }
.col-page .tc-mon .tc-callout span { display: inline-block; }

/* 表示している割合だけ見せる（data-view = a / b） */
.col-page .tc-fig:not([data-view="b"]) .tc-only--b,
.col-page .tc-fig[data-view="b"] .tc-only--a { display: none; }

/* スクリーンリーダー用の表（見た目には出さない） */
.col-page .tc-fig .tc-sr {
    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;
}

/* =============================================================
 * 図6: 月ごと（.tc-mon）
 *   広い画面は縦棒、狭い画面（〜639px）は横棒に組み替える（12本の数字が重ならないように）
 *   棒の長さ = --v / --max。--v・--max は data-view で切り替える
 * ============================================================= */
.col-page .tc-mon { --max: 25; }
.col-page .tc-mon[data-view="b"] { --max: 4.4; }
.col-page .tc-mon .tc-mon__m { --v: var(--a); }
.col-page .tc-mon[data-view="b"] .tc-mon__m { --v: var(--b); }

.col-page .tc-mon .tc-mon__plot { margin-top: 12px; }
.col-page .tc-mon .tc-mon__bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); padding-top: 50px; }
.col-page .tc-mon .tc-mon__m { display: flex; flex-direction: column-reverse; min-width: 0; }
.col-page .tc-mon .tc-mon__track { position: relative; display: block; height: 170px; border-bottom: 1px solid var(--tc-base); }
.col-page .tc-mon .tc-mon__lbl { display: block; padding-top: 5px; font-size: 13px; font-weight: 700; line-height: 1.4; text-align: center; color: var(--col-ink-2); font-variant-numeric: tabular-nums; }
.col-page .tc-mon .is-hi .tc-mon__lbl { color: var(--col-ink); }
.col-page .tc-mon .tc-mon__bar {
    position: absolute; left: 17%; right: 17%; bottom: 0;
    height: calc(var(--v) * 100% / var(--max));
    background: var(--tc-other);
    border-radius: 3px 3px 0 0;
    transform-origin: 50% 100%;
    transition: height .5s var(--tc-ease), width .5s var(--tc-ease), transform .8s var(--tc-ease) calc(var(--i, 0) * 45ms);
}
.col-page .tc-mon .is-hi .tc-mon__bar { background: var(--tc-hi); }
.col-page .tc-mon .is-low .tc-mon__bar { min-height: 5px; background: var(--tc-hatch); box-shadow: inset 0 0 0 1px rgba(13, 79, 140, .32); }
.col-page .tc-mon .is-low .tc-mon__lbl { font-weight: 500; color: #8a9aa5; }
.col-page .tc-mon .tc-mon__val {
    position: absolute; left: -4px; right: -4px;
    bottom: calc(var(--v) * 100% / var(--max) + 3px);
    font-size: 12px; line-height: 1.3; text-align: center; white-space: nowrap; color: var(--col-ink-2);
    font-variant-numeric: tabular-nums;
    transition: bottom .5s var(--tc-ease), left .5s var(--tc-ease), opacity .35s ease calc(var(--i, 0) * 45ms + .45s);
}
.col-page .tc-mon .tc-mon__val b { font-size: 13px; color: var(--col-ink); }
.col-page .tc-mon .tc-mon__tag {
    position: absolute; left: 50%; z-index: 2;
    bottom: calc(var(--v) * 100% / var(--max) + 24px);
    transform: translateX(-50%);
    padding: 0 8px;
    font-size: 12px; font-weight: 700; line-height: 20px; white-space: nowrap;
    color: #fff; background: var(--col-navy-800); border-radius: 999px;
    transition: bottom .5s var(--tc-ease), right .5s var(--tc-ease), opacity .35s ease .9s;
}

/* 要点の箇条書き */
.col-page .tc-fig .tc-points { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; font-size: 13.5px; line-height: 1.6; }
.col-page .tc-fig .tc-points li { position: relative; padding-left: 14px; }
.col-page .tc-fig .tc-points li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--tc-hi); }
.col-page .col-body .tc-fig .tc-points li::before { content: ""; }

@media (max-width: 639.98px) {
    .col-page .tc-mon .tc-mon__bars { display: block; padding-top: 0; }
    .col-page .tc-mon .tc-mon__m {
        --rs: 138px; /* 数値と「いちばん多い」の札のぶん */
        display: grid; grid-template-columns: 2.4em minmax(0, 1fr); column-gap: 8px; align-items: center;
        padding: 3px 0; border-top: 1px solid var(--tc-row);
    }
    .col-page .tc-mon .tc-mon__m:first-child { border-top: 0; }
    .col-page .tc-mon .tc-mon__lbl { padding-top: 0; text-align: right; }
    .col-page .tc-mon .tc-mon__track { height: 20px; border-bottom: 0; border-left: 1px solid var(--tc-base); }
    .col-page .tc-mon .tc-mon__bar {
        left: 0; right: auto; top: 2px; bottom: 2px; height: auto;
        width: calc((100% - var(--rs)) * var(--v) / var(--max));
        border-radius: 0 3px 3px 0;
        transform-origin: 0 50%;
    }
    .col-page .tc-mon .is-low .tc-mon__bar { min-height: 0; min-width: 4px; }
    .col-page .tc-mon .tc-mon__val {
        right: auto; bottom: auto; top: 50%;
        left: calc((100% - var(--rs)) * var(--v) / var(--max) + 6px);
        transform: translateY(-50%);
        text-align: left;
    }
    /* 10月の札は数値の右（棒の外）に置く */
    .col-page .tc-mon .tc-mon__tag {
        bottom: auto; top: 50%;
        left: calc((100% - var(--rs)) * var(--v) / var(--max) + 54px);
        transform: translateY(-50%);
        padding: 0 7px; line-height: 18px;
    }
    .col-page .tc-fig .tc-points { flex-direction: column; }
}

/* =============================================================
 * 横棒（図7 の地方・図8 の言葉）（.tc-hbars）
 *   棒の長さ = --v / --max（数字のぶん 56px 空ける）
 * ============================================================= */
.col-page .tc-fig .tc-hbars { margin-top: 6px; font-size: 14px; }
.col-page .tc-fig .tc-hbar {
    display: grid; grid-template-columns: 6.4em minmax(0, 1fr); column-gap: 8px; align-items: center;
    padding: 5px 0; border-top: 1px solid var(--tc-row);
}
.col-page .tc-fig .tc-hbar:first-child { border-top: 0; }
.col-page .tc-fig .tc-hbar__name { font-size: 14px; font-weight: 700; line-height: 1.4; }
.col-page .tc-fig .tc-hbar__track { position: relative; display: block; height: 18px; }
.col-page .tc-fig .tc-hbar__bar {
    position: absolute; left: 0; top: 0; bottom: 0;
    width: calc((100% - 56px) * var(--v) / var(--max));
    background: var(--tc-other);
    border-radius: 0 3px 3px 0;
    transform-origin: 0 50%;
    transition: transform .8s var(--tc-ease) calc(var(--i, 0) * 55ms);
}
.col-page .tc-fig .tc-hbar__val {
    position: absolute; top: 50%;
    left: calc((100% - 56px) * var(--v) / var(--max) + 6px);
    transform: translateY(-50%);
    font-size: 12px; line-height: 1.3; white-space: nowrap; color: var(--col-ink-2);
    font-variant-numeric: tabular-nums;
    transition: opacity .35s ease calc(var(--i, 0) * 55ms + .5s);
}
.col-page .tc-fig .tc-hbar__val b { font-size: 14px; color: var(--col-ink); }

/* =============================================================
 * 図7: 地方＋陸っぱり／船＋県の上位（.tc-reg）
 * ============================================================= */
.col-page .tc-reg .tc-reg__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 14px; }
.col-page .tc-reg .tc-hbar.is-top .tc-hbar__bar { background: var(--tc-hi); }
@media (min-width: 768px) {
    .col-page .tc-reg .tc-reg__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; }
    .col-page .tc-reg .tc-reg__col + .tc-reg__col { padding-left: 32px; border-left: 1px solid var(--col-line); }
}

.col-page .tc-reg .tc-split {
    display: flex; height: 44px; margin-top: 8px; overflow: hidden;
    background: #eef2f5; border-radius: 6px;
}
.col-page .tc-reg .tc-split__seg {
    position: relative; display: flex; align-items: center; min-width: 0;
    width: calc(var(--w) * 1%);
    background: var(--tc-other);
    transform-origin: 0 50%;
    transition: transform .8s var(--tc-ease) calc(var(--i, 0) * 200ms);
}
.col-page .tc-reg .tc-split__seg + .tc-split__seg { box-shadow: inset 2px 0 0 #fff; }
.col-page .tc-reg .tc-split__seg--boat { background: var(--tc-boat); }
.col-page .tc-reg .tc-split__lbl {
    padding: 0 10px; font-size: 13px; font-weight: 700; line-height: 1.3; white-space: nowrap; color: #fff;
    transition: opacity .35s ease .7s;
}
.col-page .tc-reg .tc-split__lbl b { font-size: 16px; font-variant-numeric: tabular-nums; }
.col-page .tc-reg .tc-split__seg--boat .tc-split__lbl { color: var(--col-navy-800); }

.col-page .tc-reg .tc-sub--pref { margin-top: 18px; }
.col-page .tc-reg .tc-pref { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin-top: 6px; counter-reset: none; }
.col-page .tc-reg .tc-pref li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 0; border-top: 1px solid var(--tc-row); }
.col-page .tc-reg .tc-pref li:nth-child(-n+2) { border-top: 0; }
.col-page .tc-reg .tc-pref__no {
    flex: none; width: 22px; height: 22px; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center;
    color: var(--col-navy); background: var(--col-aqua-pale); border-radius: 50%; font-variant-numeric: tabular-nums;
}
.col-page .tc-reg .tc-pref li:nth-child(-n+3) .tc-pref__no { color: #fff; background: var(--col-navy); }
.col-page .tc-reg .tc-pref__name { min-width: 0; font-size: 14.5px; font-weight: 700; line-height: 1.4; color: var(--col-ink); }
.col-page .tc-reg a.tc-pref__name { color: var(--col-navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.col-page .tc-reg a.tc-pref__name:hover { color: var(--col-navy-hi); }
.col-page .tc-reg .tc-pref__val { margin-left: auto; font-size: 13px; color: var(--col-ink-2); font-variant-numeric: tabular-nums; }

/* =============================================================
 * 図8: 書かれた言葉（.tc-words）
 * ============================================================= */
.col-page .tc-words .tc-words__hero {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px;
    margin-top: 8px; padding: 16px 16px 14px;
    background: var(--col-surface-2); border: 1px solid var(--col-line); border-radius: var(--col-r-sm);
}
.col-page .tc-words .tc-words__big {
    flex: none; font-size: 44px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; color: var(--col-navy-800);
    font-variant-numeric: tabular-nums; font-feature-settings: "palt";
}
.col-page .tc-words .tc-words__s { margin: 0 2px; font-size: 20px; letter-spacing: 0; }
.col-page .tc-words .tc-words__s:first-child { margin-left: 0; }
.col-page .tc-words .tc-words__say { flex: 1 1 16em; min-width: 0; font-size: 16px; font-weight: 700; line-height: 1.6; color: var(--col-ink); font-feature-settings: "palt"; }
.col-page .tc-words .tc-words__say span { display: inline-block; }
.col-page .tc-words .tc-hbar__note { display: block; font-size: 12px; font-weight: 500; line-height: 1.4; color: var(--col-ink-2); }
.col-page .tc-words .tc-words__how { margin-top: 18px; }
/* 釣り方の棒: 1段組・同じ目盛り。名前が長いので、狭い画面では名前を棒の上に置く */
.col-page .tc-words .tc-hbars--words { max-width: 760px; }
.col-page .tc-words .tc-hbars--words .tc-hbar { grid-template-columns: 15em minmax(0, 1fr); }
@media (max-width: 639.98px) {
    .col-page .tc-words .tc-hbars--words .tc-hbar { grid-template-columns: minmax(0, 1fr); row-gap: 3px; padding: 7px 0 6px; }
}
@media (min-width: 768px) {
    .col-page .tc-words .tc-words__hero { padding: 18px 22px 16px; }
}
@media (max-width: 400px) {
    .col-page .tc-words .tc-words__big { font-size: 38px; }
    .col-page .tc-words .tc-words__s { font-size: 18px; }
}

/* =============================================================
 * 見えたら伸びる（chart.js が .is-pre を付け、見えたら外す）
 * ============================================================= */
.col-page .tc-fig.is-pre .tc-mon__bar { transform: scaleY(0); }
.col-page .tc-fig.is-pre .tc-hbar__bar,
.col-page .tc-fig.is-pre .tc-split__seg { transform: scaleX(0); }
.col-page .tc-fig.is-pre .tc-mon__val,
.col-page .tc-fig.is-pre .tc-mon__tag,
.col-page .tc-fig.is-pre .tc-hbar__val,
.col-page .tc-fig.is-pre .tc-split__lbl { opacity: 0; transition: none; }
@media (max-width: 639.98px) {
    .col-page .tc-fig.is-pre .tc-mon__bar { transform: scaleX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .col-page .tc-fig *,
    .col-page .tc-fig *::before { transition: none !important; }
}
