.safe-system-page {
    --panel-accent: #81b925;
    --panel-border: #e4e4e4;
    --panel-inset: 35px;
}

/* The language-specific site reset supplies the font stack and body metrics. */
.panel-detail > .container {
    overflow-wrap: anywhere;
}

.panel-detail-section {
    display: flow-root;
}

.panel-detail .h6 {
    margin: 0 0 5px;
    text-indent: 0;
}

.panel-detail .normal_txt + .h6 {
    margin-top: 20px;
}

.panel-detail:lang(ja) .green_txt {
    word-break: normal;
}

.panel-benefits:lang(ja) li > span:last-child {
    font-size: 15px;
    letter-spacing: -0.05em;
}

@media (max-width: 1199px) {
    /* The mobile tab shows the product name. Keep the certification number visible. */
    #sub .panel-detail .sub_title_02 {
        display: block;
        margin-bottom: 20px;
    }
}

@media (max-width: 991px) {
    .panel-detail :is(.panel-rolling, .panel-detail-specs, .panel-benefits strong, .panel-tests figcaption) {
        font-size: 15px;
    }

    .panel-benefits strong {
        letter-spacing: -0.03em;
    }

    .panel-benefits li > span:last-child,
    .panel-benefits:lang(ja) li > span:last-child {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .panel-detail .panel-gallery figcaption {
        padding-inline-start: 10px;
    }
}

.panel-detail img {
    display: block;
    max-width: 100%;
}

.panel-detail-certifications {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 16px;
    row-gap: 8px;
}

.panel-detail-certifications > span {
    position: relative;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    overflow: hidden;
}

.panel-detail-certifications img {
    grid-area: 1 / 1;
    max-width: none;
    padding: 0;
}

.panel-detail-certifications__environment img {
    position: absolute;
    inset: 0 auto auto -3px;
}

.panel-detail-certifications__procurement img {
    position: absolute;
    inset: -6px auto auto -18px;
}

.panel-diagram {
    position: relative;
    width: min(100%, var(--diagram-width));
    aspect-ratio: var(--diagram-ratio);
    margin-inline: auto;
}

.panel-diagram img {
    position: absolute;
    top: var(--layer-y);
    left: var(--layer-x);
    width: var(--layer-width);
    height: auto;
    transform: rotate(var(--layer-rotation));
}

.panel-detail-inset {
    margin-inline: var(--panel-inset);
}

.panel-detail :is(.panel-detail-copy, .panel-detail-flow) > .normal_txt,
.panel-detail-copy--prose > .list_type01 {
    margin-inline-start: 0;
}

.panel-detail-feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 390px);
    align-items: start;
    gap: clamp(24px, 5vw, 100px);
}

.panel-detail-feature {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(30px, 6vw, 100px);
    padding: 30px var(--panel-inset);
    border-bottom: 1px solid var(--panel-border);
}

.panel-detail-feature:first-of-type {
    padding-top: 0;
}

.panel-detail-feature__art {
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 7 / 5;
    object-fit: contain;
    border: 1px solid var(--panel-border);
}

.panel-detail-feature__art--bracket {
    padding-inline: 13.3%;
}

.panel-detail-feature__art--module {
    padding: 7.5% 12.6%;
}

.panel-detail-feature__art--irregular {
    padding: 10% 10.3%;
}

.panel-detail-flow {
    display: grid;
    gap: clamp(24px, 3.2vw, 40px);
}

.panel-detail-material-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: clamp(22px, 4vw, 64px);
}

.panel-detail-material-pair--rolling {
    grid-template-columns: minmax(0, 571px) minmax(0, 1fr);
}

.panel-rolling {
    display: grid;
    gap: 16px;
    font-weight: 500;
    text-align: center;
    text-transform: uppercase;
}

.panel-rolling figcaption,
.panel-rolling div {
    display: grid;
    place-items: center;
    padding: 3px 16px;
}

.panel-rolling figcaption {
    position: relative;
    min-height: 93px;
    margin-bottom: 6px;
    padding-right: 36px;
    isolation: isolate;
}

.panel-rolling figcaption::before {
    position: absolute;
    inset: 20% 44px 20% 0;
    z-index: -1;
    background: #eee;
    content: "";
}

.panel-rolling figcaption::after {
    position: absolute;
    top: 50%;
    right: -21px;
    width: 94px;
    height: 53px;
    transform: translateY(-50%) rotate(90deg);
    background: url("../img/s_img/panels/safe-system/rolling-arrowhead.svg") center / contain no-repeat;
    content: "";
}

.panel-rolling div {
    min-height: 34px;
    background: #b75518;
    color: #fff;
}

.panel-rolling div:nth-of-type(2) {
    min-height: 56px;
    background: #afafaf;
    color: #333;
}

.panel-rolling-machine {
    width: 100%;
    aspect-ratio: 1.6;
    height: auto;
    object-fit: cover;
    object-position: center 36%;
}

.panel-process {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(20px, 4vw, 80px);
    margin-top: -20px;
}

.panel-process li {
    position: relative;
    display: grid;
    grid-template-rows: minmax(50px, auto) 110px minmax(50px, auto);
    border: 1px solid var(--panel-border);
    text-align: center;
    font-size: 14px;
}

.panel-process li:not(:last-child)::after {
    position: absolute;
    top: calc(50% - 7px);
    left: calc(100% + clamp(3px, 1.5vw, 30px));
    width: 8px;
    height: 14px;
    background: url("../img/s_img/panels/safe-system/process-arrow.png") center / contain no-repeat;
    content: "";
}

.panel-process strong,
.panel-process span {
    display: grid;
    place-items: center;
    padding: 8px;
}

.panel-process strong {
    background: #afafaf;
    color: #333;
}

.panel-process span {
    background: #e6e6e6;
    font-weight: 500;
}

.panel-process img {
    align-self: center;
    justify-self: center;
    width: 70%;
    height: 110px;
    object-fit: contain;
}

.panel-layer-stack {
    position: relative;
    width: 100%;
    margin-inline: auto;
}

.panel-layer-stack__art {
    height: auto;
}

.panel-layer-stack__labels li {
    display: flex;
    align-items: center;
    gap: 9px;
}

.panel-layer-stack__labels img {
    flex: 1 1 auto;
    min-width: 0;
    height: auto;
}

.panel-layer-stack__labels span {
    flex-shrink: 0;
}

.panel-layer-stack--rolled {
    max-width: 630px;
    aspect-ratio: 630 / 300;
    margin-top: 28px;
}

.panel-layer-stack--rolled .panel-layer-stack__art {
    width: 54%;
}

.panel-layer-stack--rolled li {
    position: absolute;
    top: var(--label-top);
    left: var(--label-left);
    right: 0;
    min-height: 24px;
    justify-content: flex-end;
    text-align: right;
    font-size: 14px;
}

.panel-layer-stack--rolled li:nth-child(1) { --label-top: 14.7%; --label-left: 28%; }
.panel-layer-stack--rolled li:nth-child(2) { --label-top: 29%; --label-left: 30%; }
.panel-layer-stack--rolled li:nth-child(3) { --label-top: 44%; --label-left: 33%; }
.panel-layer-stack--rolled li:nth-child(4) { --label-top: 59%; --label-left: 36%; }
.panel-layer-stack--rolled li:nth-child(5) { --label-top: 73%; --label-left: 23%; }

.panel-layer-stack--composite {
    max-width: 515px;
    aspect-ratio: 515 / 214;
}

.panel-layer-stack--composite .panel-layer-stack__art {
    width: 79%;
    margin-left: 21%;
}

.panel-layer-stack--composite li {
    position: absolute;
    top: var(--label-top);
    left: 0;
    width: clamp(115px, 28%, 138px);
    min-height: 18px;
    font-size: 12px;
}

.panel-layer-stack--composite li:nth-child(1) { --label-top: 2%; }
.panel-layer-stack--composite li:nth-child(2) { --label-top: 10%; }
.panel-layer-stack--composite li:nth-child(3) { --label-top: 18%; }
.panel-layer-stack--composite li:nth-child(4) { --label-top: 40%; }
.panel-layer-stack--composite li:nth-child(5) { --label-top: 57%; }
.panel-layer-stack--composite li:nth-child(6) { --label-top: 67%; }

.panel-detail-specs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    text-align: center;
}

.panel-detail-specs li {
    display: grid;
    place-content: center;
    gap: 4px;
    min-height: 68px;
    padding: 16px;
    border: 1px solid var(--panel-border);
    font-weight: 700;
}

.panel-detail-specs--described li {
    min-height: 120px;
}

.panel-detail-specs--described span {
    font-weight: 400;
}

.panel-benefits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 4.5vw, 80px);
    row-gap: clamp(18px, 4vw, 46px);
    text-align: center;
}

.panel-benefits li {
    --benefit-accent: #125eaa;
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 12px;
    min-height: 254px;
    padding: clamp(18px, 3vw, 40px) 10px;
    border: 1px solid var(--panel-border);
    border-radius: 0 22px 0 0;
}

.panel-benefits li:nth-child(even) {
    --benefit-accent: #71BF47;
}

.panel-benefits li::before {
    position: absolute;
    inset: 0 auto auto 0;
    width: 29px;
    height: 5px;
    background: #125EAA;
    content: "";
}

.panel-benefits li:nth-child(even)::before {
    background: var(--benefit-accent);
}

.panel-benefits__icon {
    position: relative;
}

.panel-benefits__icon > img {
    clip-path: circle(calc(50% - 2px));
}

.panel-benefits__icon::after {
    position: absolute;
    inset: 0;
    border: 1px solid #707070;
    border-radius: 50%;
    content: "";
}

.panel-benefits strong {
    margin-top: 16px;
    color: var(--benefit-accent);
    font-weight: 500;
}

.panel-tests {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px clamp(24px, 5vw, 68px);
}

.panel-tests figure {
    margin-bottom: clamp(16px, 3vw, 30px);
}

.panel-tests img {
    width: 100%;
    aspect-ratio: 531 / 370;
    object-fit: cover;
}

.panel-tests figcaption {
    display: grid;
    place-items: center;
    min-height: 50px;
    padding: 8px 12px;
    background: #82A913;
    color: #fff;
    font-weight: 700;
    text-align: center;
}

@supports (grid-template-rows: subgrid) {
    @media (width > 600px) {
        .panel-tests {
            row-gap: 0;
        }

        .panel-tests > article {
            display: grid;
            grid-row: span 4;
            grid-template-rows: subgrid;
        }

        .panel-tests > article:nth-last-child(n+3) {
            margin-bottom: 40px;
        }

        .panel-tests figure {
            display: grid;
            grid-row: span 2;
            grid-template-rows: subgrid;
        }
    }
}

.panel-gallery {
    display: grid;
    gap: 30px;
}

.panel-gallery__group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(8px, 2vw, 22px);
}

.panel-gallery img {
    width: 100%;
    aspect-ratio: 354 / 258;
    object-fit: cover;
}

.panel-gallery__group img:first-child { object-position: center top; }
.panel-gallery__group img:nth-child(2) { object-position: center 66%; }
.panel-gallery__group img:nth-child(3) { object-position: center 44%; }

.panel-gallery img.panel-gallery__wide {
    aspect-ratio: 1107 / 258;
    object-position: center 19%;
}

.panel-gallery figcaption {
    margin-top: 20px;
    padding-inline-start: 12px;
    background: url("../img/s_img/dt_bull02.png") no-repeat 0 4px;
    color: #111;
}

@media (max-width: 1199px) {
    .safe-system-page {
        --panel-inset: clamp(10px, 2.5vw, 28px);
    }

    .panel-detail-wide-break {
        display: none;
    }

    .panel-detail-feature-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 32%);
    }

    .panel-detail-feature {
        grid-template-columns: minmax(0, 27%) minmax(0, 1fr);
    }
}

@media (max-width: 834px) {
    .safe-system-page {
        --panel-inset: 0px;
    }

    .panel-detail-feature-layout,
    .panel-detail-material-pair {
        grid-template-columns: minmax(0, 1fr);
    }

    .panel-rolling-machine {
        width: min(100%, 500px);
        justify-self: center;
    }

    .panel-process,
    .panel-benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .panel-process li:nth-child(even)::after {
        content: none;
    }

    .panel-benefits li {
        min-height: 170px;
    }
}

@media (max-width: 600px) {
    .panel-detail-feature,
    .panel-tests {
        grid-template-columns: minmax(0, 1fr);
    }

    .panel-detail-feature {
        gap: 18px;
    }

    .panel-detail-feature__art {
        width: min(100%, 280px);
        justify-self: center;
        padding: 20px;
    }

    .panel-rolling {
        gap: 10px;
    }

    .panel-process {
        gap: 16px;
        margin-top: 0;
    }

    .panel-process li {
        grid-template-rows: minmax(42px, auto) 80px minmax(44px, auto);
    }

    .panel-process img {
        height: 80px;
    }

    .panel-layer-stack {
        aspect-ratio: auto;
        margin-top: 0;
    }

    .panel-layer-stack .panel-layer-stack__art {
        width: min(100%, 290px);
        margin-inline: auto;
    }

    .panel-layer-stack__labels {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
        gap: 8px 16px;
        margin-top: 14px;
        border-left: 2px solid var(--panel-accent);
        padding-left: 12px;
    }

    .panel-layer-stack__labels li {
        position: static;
        display: block;
        width: auto;
        min-height: 0;
        text-align: left;
        font-size: 14px;
    }

    .panel-layer-stack__labels img {
        display: none;
    }

    .panel-detail-specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .panel-detail-specs li {
        padding: 12px 8px;
    }

    .panel-gallery__group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .panel-gallery__group img:first-child {
        grid-column: 1 / -1;
        aspect-ratio: 16 / 9;
    }

    .panel-gallery img.panel-gallery__wide {
        aspect-ratio: 2 / 1;
    }
}

@media (max-width: 380px) {
    .panel-detail-specs--described {
        grid-template-columns: minmax(0, 1fr);
    }
}
