/* AFFINGER7's confirmed date UI; only a queried legacy works page receives this class. */
body.upremake-legacy-works-single.single-works article .blogbox > p > span.kdate {
    display: none;
}

/* Confirmed AFFINGER article body; no sidebar, author box or other post type. */
body.single-works article .type-works .entry-content img {
    display: block;
    float: none;
    margin-left: auto;
    margin-right: auto;
    max-inline-size: 100%;
    height: auto;
}
body.single-works article .type-works .entry-content figure,
body.single-works article .type-works .entry-content .wp-caption {
    float: none;
    margin-left: auto;
    margin-right: auto;
    max-inline-size: 100%;
    text-align: center;
}
body.single-works article .type-works .entry-content figcaption,
body.single-works article .type-works .entry-content .wp-caption-text {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Opt-in markup emitted for newly prepared B1 articles; no stored-body rewrite. */
body.single-works article .type-works .entry-content .upm-works-summary {
    margin: 20px 0 36px;
    border: 1px solid #dbe5e8;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
body.single-works article .type-works .entry-content .upm-works-summary-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    border-bottom: 1px solid #e8eef0;
}
body.single-works article .type-works .entry-content .upm-works-summary-row:last-child {
    border-bottom: 0;
}
body.single-works article .type-works .entry-content .upm-works-summary-label,
body.single-works article .type-works .entry-content .upm-works-summary-value {
    min-width: 0;
    padding: 14px 16px;
    overflow-wrap: anywhere;
    line-height: 1.8;
}
body.single-works article .type-works .entry-content .upm-works-summary-label {
    background: #f3f7f8;
    color: #174d5c;
    font-weight: 700;
}
@media (max-width: 600px) {
    body.single-works article .type-works .entry-content .upm-works-summary-row {
        grid-template-columns: 1fr;
    }
    body.single-works article .type-works .entry-content .upm-works-summary-label,
    body.single-works article .type-works .entry-content .upm-works-summary-value {
        padding: 10px 14px;
    }
}

/* Only plugin-owned in-flow components; do not reveal AFFINGER PC-only header. */
.upm-works-consultation { margin:2.5em 0; padding:1.4em; border:1px solid #b8d5c8; border-radius:8px; background:#f2f8f5; text-align:center; box-sizing:border-box; max-width:100%; }
.upm-works-consultation .upm-works-consultation-title { margin:0 0 .6em; padding:0; border:0; background:none; color:#174c38; font-size:20px; font-weight:700; line-height:1.5; }
.upm-works-consultation .upm-works-consultation-title::before, .upm-works-consultation .upm-works-consultation-title::after { display:none; }
.upm-works-consultation p { margin:0 0 1em; font-size:16px; line-height:1.75; }
.upm-works-consultation .upm-works-consultation-action { margin:0; }
.upm-works-consultation .upm-works-consultation-action a { display:inline-block; box-sizing:border-box; max-width:100%; padding:.85em 1.2em; border-radius:6px; background:#176346; color:#fff; text-decoration:none; font-weight:700; font-size:16px; line-height:1.5; }
.upm-works-consultation a:hover { background:#104c35; }
.upm-works-consultation a:focus-visible, .upm-works-browse a:focus-visible, .upm-works-browse summary:focus-visible { outline:3px solid #986200; outline-offset:3px; }
.upm-works-browse { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:0 0 28px; }
.upm-works-browse details { min-width:0; border:1px solid #dbe5e8; border-radius:8px; padding:12px; background:#f3f7f8; }
.upm-works-browse summary { cursor:pointer; font-weight:700; color:#174d5c; }
.upm-works-browse ul { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 0; padding:0; list-style:none; }
.upm-works-browse li { margin:0; padding:0; }
.upm-works-browse a { display:inline-block; padding:7px 10px; border:1px solid #c9d9df; border-radius:6px; background:#fff; color:#174d5c; text-decoration:none; overflow-wrap:anywhere; }
@media(max-width:600px) { .upm-works-browse { grid-template-columns:1fr; } }

/* Works archive only: keep every page link reachable on narrow screens. */
@media (max-width: 600px) {
    body.post-type-archive-works #content main .st-pagelink-in {
        flex-wrap: wrap;
        gap: 8px 4px;
        padding-top: 0;
    }
    body.post-type-archive-works #content main .st-pagelink-in > .page-numbers {
        box-sizing: border-box;
        flex: 0 0 auto;
        min-width: 44px;
        min-height: 44px;
        margin: 0;
        padding: 10px 8px;
        line-height: 24px;
        color: #333;
    }
    body.post-type-archive-works #content main .st-pagelink-in > .current {
        opacity: 1;
        font-weight: 700;
        background: #eee;
        border-color: #666;
    }
    body.post-type-archive-works #content main .st-pagelink-in > .dots {
        min-width: 20px;
        min-height: 0;
        padding: 0;
    }
    body.post-type-archive-works #content main .st-pagelink-in > .prev,
    body.post-type-archive-works #content main .st-pagelink-in > .next {
        display: block;
        position: static;
        width: auto;
        white-space: nowrap;
    }
}

/* 関連する施工事例（2026-10-28 追加） */
.upm-works-single .p-navi{display:none}
.upm-works-related{margin:48px 0 8px;padding:28px 24px;background:#f1f7fa;border:1px solid #d5e2e9;border-radius:10px;color:#243d4d}
.upm-works-related a{text-decoration:none}
.upm-wrel-title-main{margin:0 0 14px!important;font-size:1.15rem;font-weight:700;color:#13374f;line-height:1.5;padding:0 0 10px;border-bottom:2px solid #13374f}
.upm-wrel-chips{display:flex;flex-wrap:wrap;gap:8px;list-style:none!important;margin:0 0 26px!important;padding:0!important}
.upm-wrel-chips li{margin:0!important;padding:0!important;list-style:none!important}
.upm-wrel-chips li:before{display:none!important}
.upm-wrel-chips a{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;background:#fff;border:1px solid #125a86;border-radius:999px;color:#125a86;font-size:.88rem;font-weight:600;line-height:1.4}
.upm-wrel-chips li.is-area a{background:#13374f;border-color:#13374f;color:#fff}
.upm-wrel-chips a span{font-size:.76rem;font-weight:400;opacity:.8}
.upm-wrel-chips a:hover{opacity:.85}
.upm-wrel-group{margin:0 0 24px}
.upm-wrel-head{margin:0 0 12px!important;font-size:1rem;font-weight:700;color:#13374f;line-height:1.5;padding-left:10px;border-left:4px solid #ffda4b}
.upm-wrel-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;list-style:none!important;margin:0!important;padding:0!important}
.upm-wrel-cards li{margin:0!important;padding:0!important;list-style:none!important}
.upm-wrel-cards li:before{display:none!important}
.upm-wrel-cards a{display:block;height:100%;background:#fff;border:1px solid #d5e2e9;border-radius:8px;overflow:hidden;color:#243d4d;transition:box-shadow .2s,transform .2s}
.upm-wrel-cards a:hover{box-shadow:0 6px 18px rgba(19,55,79,.14);transform:translateY(-2px)}
.upm-wrel-thumb{display:block;aspect-ratio:4/3;background:#dfe9ef;overflow:hidden}
.upm-wrel-thumb img{display:block;width:100%!important;height:100%!important;object-fit:cover;margin:0!important;max-width:none}
.upm-wrel-title{display:block;padding:10px 12px 12px;font-size:.86rem;font-weight:600;line-height:1.55}
.upm-wrel-more{margin:10px 0 0!important;text-align:right;font-size:.88rem}
.upm-wrel-more a{color:#125a86;font-weight:600;border-bottom:1px solid #125a86}
.upm-wrel-more a:after{content:" →"}
.upm-wrel-all{margin:4px 0 0!important;text-align:center}
.upm-wrel-all a{display:inline-block;padding:10px 28px;background:#13374f;color:#fff!important;border-radius:999px;font-weight:600;font-size:.92rem}
@media (max-width:600px){
.upm-works-related{padding:22px 16px;margin-top:36px}
.upm-wrel-cards{grid-template-columns:1fr;gap:10px}
.upm-wrel-cards a{display:flex;align-items:stretch}
.upm-wrel-thumb{flex:0 0 112px;aspect-ratio:auto;min-height:84px}
.upm-wrel-title{padding:10px 12px;font-size:.92rem;display:flex;align-items:center}
.upm-wrel-chips a{font-size:.9rem}
.upm-wrel-more{text-align:left}
}
.upm-works-related .upm-wrel-more{font-size:15px!important;line-height:1.6!important}.upm-works-related .upm-wrel-head{font-size:17px!important}.upm-works-related .upm-wrel-title-main{font-size:19px!important}.upm-works-related .upm-wrel-all{font-size:15px!important}
@media (max-width:600px){.upm-works-related .upm-wrel-more{font-size:15.5px!important}.upm-works-related .upm-wrel-head{font-size:17.5px!important}}
