.tree-story {
    --tree-story-ink: #262626;
    --tree-story-gutter: max(20px, 10.8333vw);
    --tree-story-section-gap: clamp(56px, 6.25vw, 112px);
    max-width: 1410px;
    width: calc(100% - 2 * var(--tree-story-gutter));
    margin-inline: auto;
    padding-block: clamp(48px, 5vw, 90px) clamp(70px, 7.8vw, 140px);
    color: #808080;
    line-height: 2;
    letter-spacing: 0;
    text-align: left;
    overflow-wrap: anywhere;
}

.tree-story__hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 4%;
}

.tree-story__title {
    width: min(100%, 307px);
    margin-bottom: clamp(28px, 3.3vw, 60px);
}

.tree-story__lead {
    color: var(--tree-story-ink);
    font-size: clamp(18px, 1.5vw, 24px);
    font-weight: 700;
    line-height: 1.65;
    margin-bottom: 1em;
}

.tree-story__hero p + p:not(.tree-story__lead) {
    margin-top: 1.5em;
}

.tree-story__section {
    margin-top: var(--tree-story-section-gap);
}

.tree-story__heading {
    color: var(--tree-story-ink);
    font-size: clamp(22px, 2vw, 32px);
    font-weight: 700;
    line-height: 1.45;
    padding-bottom: 0.4em;
    margin-bottom: 0.55em;
    border-bottom: 1px solid #b3b3b3;
}

.tree-story__inner {
    width: 80%;
    margin-inline: auto;
}

.tree-story__link-row {
    margin-top: 0.65em;
}

.tree-story__link,
.tree-story__mail {
    font-weight: 700;
}

.tree-story__link {
    color: #676767;
    display: inline-flex;
    align-items: baseline;
    gap: 0.8em;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.tree-story__link::before,
.tree-story__mail::after {
    content: "";
    height: 0.4em;
    background: currentColor;
    clip-path: polygon(0 74%, 78% 74%, 66% 0, 74% 0, 100% 100%, 0 100%);
}

.tree-story__link::before {
    flex: none;
    width: 1.65em;
}

.tree-story__mail::after {
    flex: 0 0 1.65em;
}

.tree-story__link:hover,
.tree-story__mail:hover {
    color: #cf000e;
}

.tree-story :focus-visible {
    outline: 2px solid #595959;
    outline-offset: 3px;
}

.tree-story sup {
    font-size: 0.75em;
    vertical-align: super;
    line-height: 0;
}

.tree-story__screens {
    margin-top: clamp(24px, 2.8vw, 50px);
}

.tree-story__screen-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(8px, 0.9vw, 16px);
}

.tree-story__screen-list img {
    border-radius: clamp(12px, 1.6vw, 32px);
}

.tree-story__credit {
    margin-top: 1em;
    font-size: 0.75rem;
    text-align: right;
}

.tree-story__steps {
    display: grid;
    gap: clamp(38px, 4vw, 72px);
    margin-top: clamp(22px, 2.4vw, 43px);
}

.tree-story__steps > li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: clamp(10px, 1.1vw, 20px);
}

.tree-story__number {
    display: grid;
    place-items: center;
    width: clamp(30px, 2.8vw, 50px);
    aspect-ratio: 1;
    border-radius: 50%;
    color: var(--tree-story-ink);
    background: #d9d9d9;
    font-size: clamp(14px, 1.25vw, 20px);
    font-weight: 700;
}

.tree-story h3 {
    color: var(--tree-story-ink);
    font-size: clamp(17px, 1.5vw, 24px);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 0.55em;
    text-wrap: balance;
}

.tree-story__steps h3 {
    padding-top: 0.25em;
}

.tree-story__documents {
    margin-top: 0.6em;
}

.tree-story__documents li + li {
    margin-top: 0.3em;
}

.tree-story__steps .tree-story__address {
    margin-top: 2.5em;
}

.tree-story__address a {
    color: inherit;
}

.tree-story__address a:hover {
    text-decoration: underline;
}

.tree-story__mail {
    color: var(--tree-story-ink);
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    width: min(100%, 240px);
    min-height: clamp(44px, 3.35vw, 60px);
    margin-top: 1.4em;
    padding: 0.65em 1.25em;
    border: 1px solid currentColor;
}

.tree-story__qr-label {
    max-width: 536px;
    margin-top: 2em;
}

.tree-story figcaption {
    margin-top: 0.3em;
    line-height: 1.6;
}

.tree-story__notice {
    margin-top: clamp(26px, 3.3vw, 60px);
}

.tree-story__cases {
    margin-top: clamp(26px, 3.75vw, 68px);
}

.tree-story__cases article + article {
    margin-top: clamp(44px, 4.8vw, 86px);
}

.tree-story__cases h3 span {
    display: block;
    font-size: 0.85em;
    margin-bottom: 0.5em;
}

.tree-story__photos {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5% minmax(0, 1fr);
    margin-top: clamp(20px, 2.5vw, 45px);
}

.tree-story__photos figure:last-child {
    grid-column: 3;
}

.tree-story__photos figure:first-child {
    position: relative;
}

.tree-story__photos figure:first-child::after {
    content: "";
    position: absolute;
    top: 0;
    left: 100%;
    width: 10.526%;
    height: 0;
    padding-top: 33.333%;
    background: center bottom / 65% auto no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23262626' d='M0 7h12V1l12 11-12 11v-6H0z'/%3E%3C/svg%3E");
    transform: translateY(8%);
}

.tree-story__photos img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.tree-story + .f-footer {
    margin-top: 0;
}

@media (max-width: 799px) {
    .tree-story {
        --tree-story-gutter: max(20px, 5vw);
    }

    .tree-story__hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .tree-story__title {
        width: min(100%, 250px);
    }

    .tree-story__inner {
        width: 100%;
    }

    .tree-story__screens {
        overflow-x: auto;
        padding-bottom: 10px;
        scrollbar-color: #808080 #eee;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
    }

    .tree-story__screen-list {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: min(43.75%, 315px);
    }

    .tree-story__screen-list li {
        scroll-snap-align: start;
    }

    @supports selector(::-webkit-scrollbar) {
        .tree-story__screens {
            scrollbar-color: auto;
            scrollbar-width: auto;
        }

        .tree-story__screens::-webkit-scrollbar {
            height: 6px;
        }

        .tree-story__screens::-webkit-scrollbar-track {
            border-radius: 6px;
            background: #eee;
        }

        .tree-story__screens::-webkit-scrollbar-thumb {
            border-radius: 6px;
            background: #808080;
        }
    }

    .tree-story__photos figcaption {
        font-size: 0.85em;
    }
}
