/**
 * ホルモン味わいマップ（お客様画面）
 * 品名・軸ラベルは常に横書き。円形サムネ＋名前を図の上に置く。
 */

.tcf-taste-map,
.tcf-taste-map * {
    writing-mode: horizontal-tb;
    -webkit-writing-mode: horizontal-tb;
}

.tcf-taste-map {
    margin: 0 0 1.1rem;
    padding: 1.05rem 1.15rem 1.4rem;
    overflow: visible;
    border-radius: 16px;
    border-radius: 16px;
    border: 1px solid rgba(127, 46, 53, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 247, 240, 0.9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.tcf-taste-map__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
    margin-bottom: 0.85rem;
}

.tcf-taste-map__tag {
    display: inline-block;
    margin: 0;
    padding: 0.18rem 0.62rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #7f2629;
    background: rgba(127, 38, 41, 0.08);
}

.tcf-taste-map__title {
    margin: 0;
    font-family: 'Noto Serif JP', 'Yu Mincho', serif;
    font-size: 1.18rem;
    font-weight: 700;
    color: #1e2745;
    line-height: 1.45;
}

.tcf-taste-map__lead {
    margin: 0.12rem 0 0;
    max-width: 40rem;
    font-size: 0.84rem;
    line-height: 1.7;
    color: #5a4c40;
}

.tcf-taste-map__plot {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
}

.tcf-taste-map__mid {
    display: grid;
    grid-template-columns: 4.6rem minmax(0, 1fr) 4.6rem;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
}

.tcf-taste-map__axis {
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #7f2629;
    line-height: 1.4;
    text-align: center;
    writing-mode: horizontal-tb !important;
    -webkit-writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
}

.tcf-taste-map__axis--y-top,
.tcf-taste-map__axis--y-bottom {
    display: block;
    font-size: 1.05rem;
    white-space: nowrap;
}

.tcf-taste-map__axis--x-left,
.tcf-taste-map__axis--x-right {
    white-space: normal;
    max-width: 4.6rem;
}

.tcf-taste-map__board {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 0;
    max-width: none;
    margin: 0;
    overflow: visible;
    border-radius: 14px;
    border: 1px solid rgba(184, 139, 70, 0.38);
    /* 写真半径ぶん内側にマス目を引き、点が枠と軸ラベルに被らないようにする */
    padding: 24px;
    box-sizing: border-box;
    background:
        linear-gradient(rgba(184, 139, 70, 0.11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 139, 70, 0.11) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(248, 241, 232, 0.92));
    background-origin: content-box, content-box, padding-box;
    background-clip: content-box, content-box, padding-box;
    background-size: 25% 25%, 25% 25%, auto;
}

.tcf-taste-map__field {
    position: absolute;
    /* マス目と同じ内側領域。1〜5 が交点に乗る */
    inset: 24px;
    display: block;
}

.tcf-taste-map__slot {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    /* bottom/left の点が写真の中心になる（スタッフ配置盤と同じ） */
    transform: translate(-50%, 50%);
    z-index: 1;
}

.tcf-taste-map__slot:hover,
.tcf-taste-map__slot:focus-within {
    z-index: 4;
}

.tcf-taste-map__dot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    left: auto;
    top: auto;
    bottom: auto;
    transform: none;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-decoration: none;
    color: inherit;
    overflow: visible;
    z-index: 1;
}

.tcf-taste-map__dot:hover,
.tcf-taste-map__dot:focus-visible {
    z-index: 3;
}

.tcf-taste-map__dot-img {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #fff;
    background-color: #f4ebe0;
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 10px rgba(40, 28, 18, 0.16);
    flex: 0 0 auto;
}

.tcf-taste-map__dot-img--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Serif JP', 'Yu Mincho', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #7f2629;
    background: #f7efe6;
}

.tcf-taste-map__dot--current {
    z-index: 4;
}

.tcf-taste-map__dot--current .tcf-taste-map__dot-img {
    border-color: #7f2629;
    box-shadow:
        0 0 0 3px rgba(127, 38, 41, 0.22),
        0 2px 10px rgba(40, 28, 18, 0.16);
}

.tcf-taste-map__dot-label {
    display: block;
    position: absolute;
    left: 50%;
    top: calc(100% + 0.12rem);
    transform: translateX(-50%);
    max-width: 5.6rem;
    margin: 0;
    padding: 0.08rem 0.28rem;
    border-radius: 6px;
    background: rgba(255, 252, 247, 0.94);
    color: #3a3028;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 0 auto;
    pointer-events: none;
    writing-mode: horizontal-tb !important;
    -webkit-writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
}
.tcf-taste-map__dot-organ {
    display: block;
    margin-top: 0.04rem;
    font-size: 0.58rem;
    font-weight: 700;
    color: #7f2629;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.tcf-taste-map__dot--current .tcf-taste-map__dot-label {
    color: #7f2629;
}

.tcf-taste-map__caption {
    margin: 0.7rem 0 0;
    font-size: 0.88rem;
    line-height: 1.7;
    color: #3a3028;
}

.tcf-taste-map__firm {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.7rem;
    flex-wrap: wrap;
}

.tcf-taste-map__firm-label,
.tcf-taste-map__firm-ends {
    font-size: 0.72rem;
    font-weight: 700;
    color: #6b5c4d;
}

.tcf-taste-map__firm-dots {
    display: flex;
    gap: 0.28rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tcf-taste-map__firm-dots li {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: rgba(127, 38, 41, 0.18);
}

.tcf-taste-map__firm-dots li.is-on {
    background: #7f2629;
}

.tcf-taste-map__more {
    margin: 0.7rem 0 0;
    font-size: 0.84rem;
    font-weight: 700;
}

.tcf-taste-map__more a {
    color: #7f2629;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tcf-taste-map__cluster {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 5.8rem;
    max-width: none;
    height: auto;
    transform: none;
    z-index: 2;
}
.tcf-taste-map__cluster[data-count="2"] {
    width: 7.4rem;
}
.tcf-taste-map__cluster[data-count="3"],
.tcf-taste-map__cluster[data-count="4"],
.tcf-taste-map__cluster[data-count="5"],
.tcf-taste-map__cluster[data-count="6"] {
    width: 6.6rem;
}
.tcf-taste-map__cluster-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
}
.tcf-taste-map__cluster[data-count="2"] .tcf-taste-map__cluster-stage {
    aspect-ratio: 1.72 / 1;
}
.tcf-taste-map__cluster[data-count="3"] .tcf-taste-map__cluster-stage,
.tcf-taste-map__cluster[data-count="4"] .tcf-taste-map__cluster-stage,
.tcf-taste-map__cluster[data-count="5"] .tcf-taste-map__cluster-stage,
.tcf-taste-map__cluster[data-count="6"] .tcf-taste-map__cluster-stage {
    aspect-ratio: 1 / 1;
}
.tcf-taste-map__cluster-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed rgba(127, 38, 41, 0.32);
    background: rgba(255, 252, 247, 0.72);
    box-shadow: inset 0 0 0 1px rgba(184, 139, 70, 0.12);
    pointer-events: none;
}
.tcf-taste-map__cluster-caption {
    display: block;
    position: absolute;
    left: 50%;
    top: calc(100% + 0.1rem);
    transform: translateX(-50%);
    max-width: 8.5rem;
    margin: 0;
    padding: 0 0.1rem;
    color: #3a3028;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    writing-mode: horizontal-tb !important;
    -webkit-writing-mode: horizontal-tb !important;
}
.tcf-taste-map__dot--in-cluster {
    position: absolute;
    max-width: none;
    transform: translate(-50%, -50%);
    z-index: 3;
}
.tcf-taste-map__dot--in-cluster .tcf-taste-map__dot-img {
    width: 36px;
    height: 36px;
}
.tcf-taste-map--large .tcf-taste-map__dot--in-cluster .tcf-taste-map__dot-img {
    width: 40px;
    height: 40px;
}

.tcf-taste-map__index {
    margin: 1.05rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(184, 139, 70, 0.28);
}
.tcf-taste-map__index-title {
    margin: 0 0 0.55rem;
    font-family: 'Noto Serif JP', 'Yu Mincho', serif;
    font-size: 1.02rem;
    font-weight: 700;
    color: #1e2745;
    line-height: 1.4;
}
.tcf-taste-map__index-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tcf-taste-map__index-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.35rem 0.4rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
}
.tcf-taste-map__index-item:hover,
.tcf-taste-map__index-item:focus-visible {
    background: rgba(127, 38, 41, 0.06);
}
.tcf-taste-map__index-img {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    margin-top: 0.12rem;
    border-radius: 50%;
    border: 2px solid #fff;
    background-color: #f4ebe0;
    background-size: cover;
    background-position: center;
    box-shadow: 0 1px 6px rgba(40, 28, 18, 0.12);
}
.tcf-taste-map__index-img--fallback {
    background: #f7efe6;
}
.tcf-taste-map__index-meta {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 0;
}
.tcf-taste-map__index-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: #3a3028;
    line-height: 1.3;
}
.tcf-taste-map__index-organ {
    font-weight: 600;
    color: #7f2629;
    letter-spacing: 0.02em;
}
.tcf-taste-map__index-traits {
    font-size: 0.72rem;
    font-weight: 700;
    color: #7f2629;
    line-height: 1.35;
}
.tcf-taste-map__index-note {
    font-size: 0.7rem;
    line-height: 1.5;
    color: #6b5c4d;
    white-space: normal;
}

.tcf-taste-map--large {
    padding: 1.1rem 1.15rem 1.25rem;
}

.tcf-taste-map--large .tcf-taste-map__plot {
    max-width: 34rem;
    gap: 0.7rem;
}

.tcf-taste-map--large .tcf-taste-map__mid {
    grid-template-columns: 5.4rem minmax(0, 1fr) 5.4rem;
    gap: 0.55rem;
}

.tcf-taste-map--large .tcf-taste-map__axis--x-left,
.tcf-taste-map--large .tcf-taste-map__axis--x-right {
    max-width: 5.4rem;
}

.tcf-taste-map--large .tcf-taste-map__board {
    overflow: visible;
}

.tcf-taste-map--large .tcf-taste-map__dot {
    transform: none;
}
.tcf-taste-map--large .tcf-taste-map__dot--in-cluster {
    transform: translate(-50%, -50%);
}

.tcf-taste-map--large .tcf-taste-map__dot-img {
    width: 48px;
    height: 48px;
}

.tcf-taste-map--solo .tcf-taste-map__plot {
    max-width: 22rem;
}

.tcf-taste-map--solo {
    padding: 0.8rem 0.75rem 0.9rem;
}
.tcf-taste-map--solo .tcf-taste-map__title {
    font-size: 1rem;
}

.tcf-taste-map--desktop .tcf-taste-map__dot-img,
.tcf-taste-map--mobile .tcf-taste-map__dot-img {
    width: 48px;
    height: 48px;
}

.tcf-taste-map--desktop .tcf-taste-map__dot,
.tcf-taste-map--mobile .tcf-taste-map__dot {
    width: auto;
    transform: none;
}
.tcf-taste-map--desktop .tcf-taste-map__dot--in-cluster,
.tcf-taste-map--mobile .tcf-taste-map__dot--in-cluster {
    transform: translate(-50%, -50%);
}

.tcf-taste-map--desktop .tcf-taste-map__dot-label,
.tcf-taste-map--mobile .tcf-taste-map__dot-label {
    font-size: 0.66rem;
    max-width: none;
}

body.tbt-page-hormone-taste-map .entry-content .tcf-taste-map,
body.tbt-page-hormone-taste-map .entry-content .tcf-taste-map * {
    writing-mode: horizontal-tb !important;
    -webkit-writing-mode: horizontal-tb !important;
}

@media (max-width: 781px) {
    .tcf-taste-map {
        padding: 0.78rem 0.7rem 0.9rem;
    }

    .tcf-taste-map__title {
        font-size: 1.02rem;
    }

    .tcf-taste-map__lead {
        font-size: 0.78rem;
        line-height: 1.6;
    }

    .tcf-taste-map__plot {
        max-width: 22rem;
    }

    .tcf-taste-map__mid {
        grid-template-columns: 3.4rem minmax(0, 1fr) 3.4rem;
        gap: 0.28rem;
    }

    .tcf-taste-map__axis {
        font-size: 0.82rem;
    }

    .tcf-taste-map__axis--y-top,
    .tcf-taste-map__axis--y-bottom {
        font-size: 0.88rem;
    }

    .tcf-taste-map__axis--x-left,
    .tcf-taste-map__axis--x-right {
        max-width: 3.4rem;
        white-space: normal;
    }

    .tcf-taste-map__board {
        min-height: 0;
        aspect-ratio: 1 / 1;
    }

    .tcf-taste-map__board {
        padding: 20px;
    }

    .tcf-taste-map__field {
        inset: 20px;
    }

    .tcf-taste-map__dot {
        width: auto;
        transform: none;
    }
    .tcf-taste-map__dot--in-cluster {
        transform: translate(-50%, -50%);
    }

    .tcf-taste-map__dot-img {
        width: 46px;
        height: 46px;
    }

    .tcf-taste-map__dot-label {
        font-size: 0.58rem;
        max-width: 4.4rem;
        white-space: nowrap;
    }

    /* 狭い画面では図の品名が潰れるので写真のみ。名前は下の一覧へ */
    .tcf-taste-map--large .tcf-taste-map__dot-label,
    .tcf-taste-map--large .tcf-taste-map__cluster-caption {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .tcf-taste-map__cluster-caption {
        font-size: 0.54rem;
    }
    .tcf-taste-map__dot--in-cluster .tcf-taste-map__dot-img,
    .tcf-taste-map--large .tcf-taste-map__dot--in-cluster .tcf-taste-map__dot-img {
        width: 30px;
        height: 30px;
    }

    .tcf-taste-map__index-list {
        grid-template-columns: 1fr;
        gap: 0.28rem;
    }
    .tcf-taste-map__index-title {
        font-size: 0.95rem;
    }
    .tcf-taste-map__index-name {
        font-size: 0.82rem;
    }

    .tcf-taste-map--large .tcf-taste-map__mid {
        grid-template-columns: 3.4rem minmax(0, 1fr) 3.4rem;
        gap: 0.28rem;
    }

    .tcf-taste-map--large .tcf-taste-map__axis--x-left,
    .tcf-taste-map--large .tcf-taste-map__axis--x-right {
        max-width: 3.4rem;
    }

    .tcf-taste-map--large .tcf-taste-map__plot,
    .tcf-taste-map--solo .tcf-taste-map__plot {
        max-width: 22rem;
    }

    .tcf-taste-map--large .tcf-taste-map__board {
        min-height: 0;
        max-width: none;
        overflow: visible;
    }

    .tcf-taste-map--large .tcf-taste-map__dot-img {
        width: 50px;
        height: 50px;
    }

    .tcf-taste-map__caption {
        font-size: 0.8rem;
        line-height: 1.55;
    }
}

/* スタッフ／Woo商品編集の配置盤 */
.tcf-taste-staff-plot-wrap { margin: 6px 0 8px; text-align: center; }
.tcf-taste-staff-axis {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #6b5c4d;
    letter-spacing: 0.04em;
    writing-mode: horizontal-tb;
    -webkit-writing-mode: horizontal-tb;
}
.tcf-taste-staff-row { display: flex; align-items: center; gap: 8px; justify-content: center; }
.tcf-taste-staff-axis--left,
.tcf-taste-staff-axis--right { max-width: 3.5rem; white-space: normal; line-height: 1.3; }
.tcf-taste-staff-plot {
    position: relative;
    flex: 0 0 220px;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(184, 139, 70, 0.45);
    border-radius: 10px;
    background:
        linear-gradient(rgba(184, 139, 70, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 139, 70, 0.14) 1px, transparent 1px),
        #fffdf8;
    background-size: 25% 25%, 25% 25%, auto;
    cursor: crosshair;
    padding: 0;
}
.tcf-taste-staff-marker {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #7f2629;
    border: 2px solid #fff;
    transform: translate(-50%, 50%);
    box-shadow: 0 0 0 3px rgba(127, 38, 41, 0.2);
    pointer-events: none;
}
.tcf-taste-staff-readout { margin: 4px 0 0; font-size: 12px; font-weight: 700; color: #3a3028; }
