/* =============================================================
 * 記事「釣果写真の撮り方」: 切り取りの図（.cx-crop）
 * crop.blade.php から1回だけ読み込む。色・書体は column.css の変数を使う。
 * 箱: 白地・1px の線・角丸・影なし。図の中の文字は 13px 以上。
 * 例A／B／C は .cx-crop[data-cx-ex] で切り替える（JS が無ければ c のまま）。
 * 地図カードの枠は、サイトの地図と同じ境目（767.98px）でスマホ／PC を出し分ける。
 * ============================================================= */

.col-page .cx-crop {
    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);
    text-wrap: pretty; /* 1字だけの折り返しを避ける */
}
/* ワイド枠: column.css の .col-wide は狭い画面で左右に gutter ぶん狭くなるので、本文幅に戻す */
@supports (width: 1cqw) {
    .col-page .cx-crop.col-wide {
        margin-left: calc((100% - min(var(--col-wide), 100cqw)) / 2);
        margin-right: calc((100% - min(var(--col-wide), 100cqw)) / 2);
    }
}
.col-page .cx-crop p,
.col-page .cx-crop ul,
.col-page .cx-crop ol,
.col-page .cx-crop li { margin: 0; padding: 0; list-style: none; }
.col-page .col-body .cx-crop li + li,
.col-page .col-section .cx-crop li + li { margin-top: 0; }
.col-page .cx-crop b,
.col-page .cx-crop strong { font-weight: 700; background: none; }
.col-page .cx-crop .cx-crop__sr {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---- 例A／B／C の出し分け ---- */
.col-page .cx-crop:not([data-cx-ex="a"]) .cx-crop__only--a,
.col-page .cx-crop:not([data-cx-ex="b"]) .cx-crop__only--b,
.col-page .cx-crop:not([data-cx-ex="c"]) .cx-crop__only--c { display: none !important; }
/* スマホ幅／PC幅の出し分け（サイトの地図と同じ境目） */
@media (max-width: 767.98px) {
    .col-page .cx-crop .cx-crop__pc { display: none !important; }
}
@media (min-width: 768px) {
    .col-page .cx-crop .cx-crop__sp { display: none !important; }
}

/* ---- 題 ---- */
.col-page .cx-crop .cx-crop__eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; line-height: 1.6; color: var(--col-navy); }
.col-page .cx-crop .cx-crop__title { margin-top: 2px; font-size: 19px; font-weight: 700; line-height: 1.5; color: var(--col-navy-800); }
.col-page .cx-crop .cx-crop__title span { display: inline-block; }

/* ---- 切り替え（図の中で上に固定。どの枠を見ていても押せる） ---- */
.col-page .cx-crop .cx-crop__switch {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
    margin: 10px -6px 0; padding: 6px;
    background: rgba(255, 255, 255, .96);
    border-radius: var(--col-r-sm);
}
.col-page .cx-crop .cx-crop__btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    min-width: 0; min-height: 54px; margin: 0; padding: 6px 4px;
    font-family: inherit; letter-spacing: 0; text-align: center; line-height: 1.3; white-space: nowrap;
    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 .cx-crop .cx-crop__btn:hover { border-color: var(--col-navy); }
.col-page .cx-crop .cx-crop__btn:focus-visible { outline: 3px solid rgba(76, 195, 240, .85); outline-offset: 2px; }
.col-page .cx-crop .cx-crop__btnrow { display: flex; align-items: center; gap: 5px; }
.col-page .cx-crop .cx-crop__btnrow b { font-size: 14.5px; }
.col-page .cx-crop .cx-crop__btn small { font-size: 13px; font-weight: 400; opacity: .9; }
.col-page .cx-crop .cx-crop__btnkey {
    display: grid; place-items: center; flex: none; width: 21px; height: 21px;
    font-size: 13px; font-weight: 700; color: var(--col-navy); background: var(--col-aqua-pale); border-radius: 50%;
}
.col-page .cx-crop .cx-crop__btn[aria-pressed="true"] { color: #fff; background: var(--col-navy); border-color: var(--col-navy); }
.col-page .cx-crop .cx-crop__btn[aria-pressed="true"] .cx-crop__btnkey { color: var(--col-navy-900); background: var(--col-gold-hi); }
/* JS が動かないとき: 押しても何も起きないので、場所だけ残して見せない */
.col-page .cx-crop:not(.is-js) .cx-crop__switch { visibility: hidden; }

/* ---- 説明の一文 ---- */
.col-page .cx-crop .cx-crop__lead {
    margin-top: 8px; padding: 10px 12px;
    font-size: 15px; line-height: 1.7;
    background: var(--col-surface-2); border-radius: var(--col-r-sm);
}
.col-page .cx-crop .cx-crop__lbl {
    display: inline-block; margin-right: 8px; padding: 0 8px;
    font-size: 13px; line-height: 1.75; color: #fff; background: var(--col-navy); border-radius: 999px;
    vertical-align: 1px;
}
.col-page .cx-crop .cx-crop__lbl.is-bad { background: #9a3412; }

/* ---- 凡例 ---- */
.col-page .cx-crop .cx-crop__legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 12px; font-size: 13px; line-height: 1.6; color: var(--col-ink-2); }
.col-page .cx-crop .cx-crop__legend li { display: flex; align-items: center; gap: 6px; }
.col-page .cx-crop .cx-crop__lg { display: inline-block; flex: none; width: 22px; height: 15px; border-radius: 3px; }
.col-page .cx-crop .cx-crop__lg--keep { background: #d4eefa; box-shadow: inset 0 0 0 2.5px #e2b900; }
.col-page .cx-crop .cx-crop__lg--cut { background: rgba(7, 21, 38, .66); }

/* ---- 3つの枠 ---- */
.col-page .cx-crop .cx-crop__panels { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 10px; }
.col-page .cx-crop .cx-crop__panel {
    display: flex; flex-direction: column; min-width: 0;
    padding: 10px 10px 12px;
    background: #fff; border: 1px solid var(--col-line); border-radius: var(--col-r-sm);
}
.col-page .cx-crop .cx-crop__pname { display: flex; align-items: flex-start; gap: 8px; font-size: 15.5px; font-weight: 700; line-height: 1.45; color: var(--col-navy-800); }
.col-page .cx-crop .cx-crop__ptitle { flex: 1 1 auto; min-width: 0; }
.col-page .cx-crop .cx-crop__ptitle span { display: inline-block; }
.col-page .cx-crop .cx-crop__pnum {
    display: grid; place-items: center; flex: none; width: 22px; height: 22px;
    font-size: 13px; color: var(--col-navy-900); background: var(--col-gold-hi); border-radius: 50%;
}
.col-page .cx-crop .cx-crop__ptag {
    flex: none; padding: 0 9px;
    font-size: 13px; font-weight: 700; line-height: 1.75; white-space: nowrap; border-radius: 999px;
}
.col-page .cx-crop .cx-crop__ptag.is-cut { color: #fff; background: var(--col-navy-800); }
.col-page .cx-crop .cx-crop__ptag.is-keep { color: var(--col-navy); background: var(--col-aqua-pale); box-shadow: inset 0 0 0 1px rgba(13, 79, 140, .3); }
.col-page .cx-crop .cx-crop__pwhere { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 5px; font-size: 13px; line-height: 1.5; color: var(--col-ink-2); }

.col-page .cx-crop .cx-crop__shot { position: relative; width: 100%; margin-top: 8px; overflow: hidden; border-radius: 8px; background: #c9cdd2; }
.col-page .cx-crop .cx-crop__shot.is-tall { width: 75%; margin-left: auto; margin-right: auto; }
.col-page .cx-crop .cx-crop__svg { display: block; width: 100%; height: auto; }
.col-page .cx-crop .cx-crop__chip {
    position: absolute; left: 50%; transform: translateX(-50%);
    max-width: calc(100% - 16px); padding: 1px 9px;
    font-size: 13px; font-weight: 700; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--col-navy-900); background: var(--col-gold-hi); border-radius: 999px;
}
.col-page .cx-crop .cx-crop__cut {
    position: absolute;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; line-height: 1; color: #fff;
}
.col-page .cx-crop .cx-crop__cut.is-side { top: 0; bottom: 0; letter-spacing: .15em; writing-mode: vertical-rl; text-orientation: upright; }
.col-page .cx-crop .cx-crop__cut.is-top { left: 0; right: 0; letter-spacing: .1em; }

.col-page .cx-crop .cx-crop__verdict { margin-top: 8px; font-size: 15px; font-weight: 700; line-height: 1.5; text-wrap: pretty; }
.col-page .cx-crop .cx-crop__verdict .cx-crop__only { display: flex; align-items: flex-start; gap: 6px; }
.col-page .cx-crop .cx-crop__verdict .cx-crop__only::before {
    display: grid; place-items: center; flex: none; width: 20px; height: 20px; margin-top: 1.5px;
    font-size: 13px; line-height: 1; color: #fff; border-radius: 50%;
}
.col-page .cx-crop .cx-crop__verdict .is-good { color: var(--col-navy); }
.col-page .cx-crop .cx-crop__verdict .is-good::before { content: "○"; background: var(--col-navy); }
.col-page .cx-crop .cx-crop__verdict .is-bad { color: #9a3412; }
.col-page .cx-crop .cx-crop__verdict .is-bad::before { content: "×"; background: #9a3412; font-size: 14px; }
.col-page .cx-crop .cx-crop__note { margin-top: 4px; font-size: 13px; line-height: 1.6; color: var(--col-ink-2); text-wrap: pretty; }

.col-page .cx-crop .cx-crop__eg { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--col-ink-2); }
.col-page .cx-crop .cx-crop__cap { margin-top: 10px; font-size: 13.5px; line-height: 1.7; color: var(--col-ink-2); }

/* ---- イラスト（SVG）の色 ---- */
.col-page .cx-crop .cx-crop__sky { fill: #d4eefa; }
.col-page .cx-crop .cx-crop__sun { fill: #ffe07a; }
.col-page .cx-crop .cx-crop__isle { fill: #8db7a2; }
.col-page .cx-crop .cx-crop__sea { fill: #3b8cc2; }
.col-page .cx-crop .cx-crop__wave { fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 2.5; stroke-linecap: round; }
.col-page .cx-crop .cx-crop__quay { fill: #c9cdd2; }
.col-page .cx-crop .cx-crop__edge { fill: none; stroke: #e7e9ec; stroke-width: 4; }
.col-page .cx-crop .cx-crop__joint { fill: none; stroke: #b2b8bf; stroke-width: 2; }
.col-page .cx-crop .cx-crop__shadow { fill: rgba(14, 42, 61, .16); }
.col-page .cx-crop .cx-crop__body { fill: #5f8aa8; }
.col-page .cx-crop .cx-crop__belly { fill: #e6edf2; }
.col-page .cx-crop .cx-crop__fin,
.col-page .cx-crop .cx-crop__tail { fill: #44708f; }
.col-page .cx-crop .cx-crop__lat { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 1.4; }
.col-page .cx-crop .cx-crop__gill { fill: none; stroke: #2f526b; stroke-width: 2; stroke-linecap: round; }
.col-page .cx-crop .cx-crop__eye { fill: #fff; stroke: #2f526b; stroke-width: 1.2; }
.col-page .cx-crop .cx-crop__pupil { fill: #0b1f3a; }
.col-page .cx-crop .cx-crop__dim { fill: rgba(7, 21, 38, .66); }
.col-page .cx-crop .cx-crop__frame { fill: none; stroke: #f0d43a; stroke-width: 4; }

/* 切り替えたときに、ふわっと出す（動きを減らす設定では出さない） */
.col-page .cx-crop.is-js .cx-crop__ex { animation: cxCropIn .32s ease both; }
@keyframes cxCropIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- 広い画面: 3つの枠を横に並べる ---- */
@container (min-width: 700px) {
    .col-page .cx-crop { padding: 24px 26px 22px; font-size: 16px; }
    .col-page .cx-crop .cx-crop__title { font-size: 22px; }
    .col-page .cx-crop .cx-crop__switch { grid-template-columns: repeat(3, minmax(0, 200px)); gap: 10px; margin-left: -8px; margin-right: -8px; padding: 8px; }
    .col-page .cx-crop .cx-crop__btn { flex-direction: row; gap: 8px; min-height: 48px; }
    .col-page .cx-crop .cx-crop__btnrow b { font-size: 15px; }
    .col-page .cx-crop .cx-crop__lead { font-size: 15.5px; padding: 12px 16px; }
    .col-page .cx-crop .cx-crop__panels { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .col-page .cx-crop .cx-crop__panel { padding: 12px 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .col-page .cx-crop .cx-crop__btn { transition: none; }
    .col-page .cx-crop.is-js .cx-crop__ex { animation: none; }
}

@media print {
    .col-page .cx-crop .cx-crop__switch { display: none; }
}
