/* ══════════════════════════════════════════════════════════════
   Crestix Careers - Ultimate Hi-Fidelity Design System (CSS)
   ══════════════════════════════════════════════════════════════ */

/* CSS Custom Properties */
:root {
    --text-sub: #6b7280;
}

/* 1. Global Base */
body {
    font-family: 'Noto Sans JP', 'Poppins', sans-serif;
    color: #333333;
    background-color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.8;
    letter-spacing: 0.01em;
    line-break: strict;
    word-break: keep-all;
    overflow-wrap: break-word;
    font-feature-settings: "palt";
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

main p,
main li,
main dd {
    line-break: strict;
    word-break: keep-all;
    overflow-wrap: break-word;
}

body .content-section p,
body .content-section li,
body .acc-detail-text,
body .service-detail-section__title,
body .service-detail-section__desc {
    word-break: keep-all;
    overflow-wrap: break-word;
}

main p:not([class*="font-poppins"]):not([class*="uppercase"]):not([class*="tracking-"]) {
    max-width: none;
}

main .text-center p,
main [class*="text-center"] p,
main footer p,
footer p {
    max-width: none;
}

.footer-logo {
    display: block;
    margin: 0 auto;
    line-height: 0;
    width: fit-content;
}

.footer-logo img {
    width: 160px;
    height: auto;
    filter: none;
    display: block;
}

.index-footer {
    text-align: center;
}

.index-footer .footer-logo {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

.index-footer .footer-logo img {
    margin: 0 auto;
}

/* Entry / CTA buttons: remove decorative shadows globally */
.btn-entry,
.entry-btn,
.cta-btn,
.nav-cta-btn,
.cx-nav-entry-btn,
.fm-cta-btn,
.toc-entry-btn,
.acc-entry-link,
.job-apply,
.job-floating-apply,
.member-entry-btn,
a[href*="entry"] {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
}

.btn-entry:hover,
.entry-btn:hover,
.cta-btn:hover,
.nav-cta-btn:hover,
.cx-nav-entry-btn:hover,
.fm-cta-btn:hover,
.toc-entry-btn:hover,
.acc-entry-link:hover,
.job-apply:hover,
.job-floating-apply:hover,
.member-entry-btn:hover,
a[href*="entry"]:hover {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
}

main h1,
main h2,
main h3,
main h4 {
    text-wrap: balance;
    line-break: strict;
}

main h1.tracking-tighter,
main h2.tracking-tighter,
main h3.tracking-tighter,
main h4.tracking-tighter,
main p.tracking-tighter {
    letter-spacing: -0.015em;
}

@media (max-width: 640px) {
    body {
        line-height: 1.85;
        letter-spacing: 0;
    }

    main p,
    main li,
    main dd {
        line-height: 1.9;
    }

    main h1.tracking-tighter,
    main h2.tracking-tighter,
    main h3.tracking-tighter,
    main h4.tracking-tighter,
    main p.tracking-tighter {
        letter-spacing: 0;
    }
}

@media (min-width: 1921px) {
    .corp-hero,
    .div-hero,
    .mvv-hero-simple,
    .hero-bg-custom {
        background-size: 1920px auto !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-color: #0A1E3C;
    }

    .mercari-watermark {
        font-size: 18rem;
    }

    .mercari-unleash-text {
        font-size: 7.5rem;
    }

    .cx-contents-flex-wrap {
        height: 620px;
    }

    #sec-site-contents > .max-w-\[1400px\],
    #sec-youtube-carousel .max-w-\[1400px\],
    .max-w-\[1400px\] {
        max-width: 1400px !important;
    }

}

@media (min-width: 1440px) {
    .service-page-frame,
    .page-grid[style*="max-width:1200px"] {
        width: calc(100% - 80px) !important;
        max-width: none !important;
    }

    .page-grid > .sidebar + .main-content .content-section {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }

    .page-grid > .sidebar + .main-content #jobs .jobs-category-title {
        font-size: 15px !important;
    }

    .page-grid > .sidebar + .main-content #jobs .acc-title {
        font-size: 22px !important;
        line-height: 1.45 !important;
    }

    .page-grid > .sidebar + .main-content #jobs .acc-detail-label {
        font-size: 13px !important;
    }

    .page-grid > .sidebar + .main-content #jobs .acc-detail-text {
        font-size: 17px !important;
        line-height: 2 !important;
    }

    .page-grid > .sidebar + .main-content #members .members-grid {
        max-width: 1120px;
    }
}

.page-grid > .sidebar + .main-content #members .members-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.page-grid > .sidebar + .main-content #members .member-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.page-grid > .sidebar + .main-content #members .member-img {
    aspect-ratio: 4 / 3;
    height: auto;
    overflow: hidden;
    position: relative;
}

.page-grid > .sidebar + .main-content #members .member-body {
    padding: 16px 20px 20px;
}

.page-grid > .sidebar + .main-content #members .member-quote {
    font-size: 13px;
    line-height: 1.7;
    word-break: keep-all;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .page-grid > .sidebar + .main-content #members .members-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .page-grid > .sidebar + .main-content #members .members-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 2. Overlap & Typography (Mercari Style) */
.mercari-watermark {
    font-family: 'Poppins', sans-serif;
    font-size: 15vw;
    line-height: 0.8;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: rgba(255, 255, 255, 0.08);
    user-select: none;
    pointer-events: none;
    text-transform: uppercase;
}

.mercari-unleash-text {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 5.5vw, 7.5rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.04em;
    text-align: center;
    width: 100%;
    position: absolute;
    bottom: -0.45em;
    left: 0;
    z-index: 25;
    white-space: nowrap;
    color: #FFFFFF;
    text-shadow: 0 10px 40px rgba(0,0,0,0.2);
    pointer-events: none;
}

/* 3. 3D Carousel (BLACK CORPORATION Style) */
.bc-carousel-viewport { perspective: 2000px; }
.bc-card-3d { 
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); 
    transform-style: preserve-3d;
}
.bc-card-3d.active {
    transform: translate3d(0, 0, 120px) scale(1.05);
    z-index: 20;
    opacity: 1;
    box-shadow: 0 80px 150px -30px rgba(0, 0, 0, 0.5);
}
.bc-card-3d.inactive-left {
    transform: translate3d(-35%, 0, -250px) rotateY(35deg) scale(0.75);
    opacity: 0.25;
    z-index: 5;
    filter: blur(4px) grayscale(0.8);
}
.bc-card-3d.inactive-right {
    transform: translate3d(35%, 0, -250px) rotateY(-35deg) scale(0.75);
    opacity: 0.25;
    z-index: 5;
    filter: blur(4px) grayscale(0.8);
}

/* 4. Infinite Marquee & Culture Snaps (Goodpatch Style) */
.marquee-wrapper { display: flex; overflow: hidden; user-select: none; gap: 2rem; width: 100%; }
.marquee-content {
    display: flex;
    flex-shrink: 0;
    justify-content: space-around;
    min-width: 100%;
    gap: 2.5rem;
    animation: scroll-left 50s linear infinite;
}
.marquee-content-reverse {
    display: flex;
    flex-shrink: 0;
    justify-content: space-around;
    min-width: 100%;
    gap: 2.5rem;
    animation: scroll-right 55s linear infinite;
}
@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(calc(-100% - 2.5rem)); } }
@keyframes scroll-right { from { transform: translateX(calc(-100% - 2.5rem)); } to { transform: translateX(0); } }

.marquee-wrapper:hover .marquee-content, 
.marquee-wrapper:hover .marquee-content-reverse { 
    animation-play-state: paused; 
}

.culture-snap-card { overflow: hidden; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); cursor: pointer; }
.culture-snap-img {
    filter: grayscale(100%);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(1);
}
.culture-snap-card:hover { transform: translateY(-15px) scale(1.02); z-index: 10; }
.culture-snap-card:hover .culture-snap-img {
    filter: grayscale(0%);
    transform: scale(1.15);
}

/* 5. Aurora Background (HERP Style) */
.herp-aurora {
    position: absolute;
    width: 180%;
    height: 500px;
    background: linear-gradient(90deg, 
        rgba(255,92,0,0.5) 0%, 
        rgba(255,154,158,0.4) 20%, 
        rgba(161,196,253,0.4) 50%, 
        rgba(194,233,251,0.4) 80%, 
        rgba(255,255,255,0.3) 100%
    );
    filter: blur(120px);
    transform: rotate(-15deg) translateY(-50%);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
    animation: aurora-move 30s infinite alternate ease-in-out;
}
@keyframes aurora-move {
    0% { transform: rotate(-15deg) translateY(-50%) translateX(-10%); }
    100% { transform: rotate(-10deg) translateY(-30%) translateX(10%); }
}

/* 6. Cinemagraph Animations (Goodpatch Style) */
@keyframes cinemagraph-wave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(25deg); } }
@keyframes cinemagraph-nod { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
@keyframes cinemagraph-clap { 0%, 100% { transform: scaleX(1) scaleY(1); } 50% { transform: scaleX(0.8) scaleY(0.9); } }

.animate-wave { transform-origin: bottom right; animation: cinemagraph-wave 1.2s ease-in-out infinite; }
.animate-nod { transform-origin: center; animation: cinemagraph-nod 1.2s ease-in-out infinite; }
.animate-clap { transform-origin: center; animation: cinemagraph-clap 0.5s ease-in-out infinite; }

/* 7. Mega Modal Architecture */
.modal-overlay {
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.5s ease;
}
.modal-content-anim {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}
.modal-hidden { opacity: 0; pointer-events: none; }
.modal-hidden .modal-content-anim { transform: translateY(60px) scale(0.96); }

/* 8. Service List Item (LayerX Style) */
.service-list-item {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--item-color, #FF5C00);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
    opacity: 0.04;
}
.service-list-item:hover::before { width: 100%; }
.service-list-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 100%;
    background-color: var(--item-color, #FF5C00);
    transform: scaleY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    transform-origin: center;
}
.service-list-item:hover::after { transform: scaleY(1); }

/* 9. Layout Utils */
.preview-scroll { scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; }
.preview-scroll::-webkit-scrollbar { display: none; }

.glass-nav { background: rgba(0, 0, 0, 0.15); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }

/* 10. Custom Hero Background */
.hero-bg-custom {
    background-image: 
        linear-gradient(135deg, rgba(255, 92, 0, 0.5) 0%, rgba(230, 82, 0, 0.6) 100%),
        url('../images/office/crestix.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* 11. Forms */
input, select, textarea {
    transition: all 0.3s ease;
}
input:focus, select:focus, textarea:focus {
    border-color: #FF5C00 !important;
    box-shadow: 0 0 0 4px rgba(255, 92, 0, 0.1);
}

/* ─── Site Contents Cards ────────────────────────────── */
@media (min-width: 1024px) {
    .cx-contents-flex-wrap {
        display: flex !important;
        flex-direction: row !important;
        height: 620px;
        overflow: hidden;
    }

    .cx-accordion-card {
        flex: 1;
        width: auto !important;
        height: 100% !important;
        transition: flex 0.65s cubic-bezier(0.25, 1, 0.3, 1) !important;
    }

    .cx-contents-flex-wrap:hover .cx-accordion-card:not(:hover) {
        flex: 0.55;
    }

    .cx-accordion-card:hover {
        flex: 2.35;
    }

    .cx-card-detail {
        max-height: 0;
        opacity: 0;
        transform: translateY(15px);
        visibility: hidden;
        overflow: hidden;
        transition:
            max-height 0.5s ease,
            opacity 0.45s ease,
            transform 0.5s cubic-bezier(0.25, 1, 0.3, 1),
            visibility 0s linear 0.5s;
        width: 340px;
        max-width: 90%;
    }

    .cx-accordion-card:hover .cx-card-detail {
        max-height: 150px;
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
        transition:
            max-height 0.5s ease,
            opacity 0.45s ease 0.1s,
            transform 0.5s cubic-bezier(0.25, 1, 0.3, 1) 0.05s,
            visibility 0s linear 0s;
        margin-top: 10px;
    }

    .cx-view-more-box {
        display: inline-flex;
        align-items: center;
        padding: 8px 20px;
        border: 1px solid rgba(255, 255, 255, 0);
        transition: border-color 0.4s ease;
        margin-top: 8px;
    }

    .cx-accordion-card:hover .cx-view-more-box {
        border-color: rgba(255, 255, 255, 0.8);
    }

    .cx-arrow {
        transition: transform 0.3s ease;
    }

    .cx-accordion-card:hover .cx-arrow {
        transform: translateX(5px);
    }

    .cx-accordion-card .absolute.bottom-8 {
        width: 320px;
        max-width: 85%;
    }
}

@media (max-width: 1023px) {
    #sec-site-contents {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #sec-site-contents .cx-contents-flex-wrap {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0 !important;
        width: calc(100% - 20px) !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: 0 !important;
        border-top: 1px solid #e5e7eb;
        border-left: 1px solid #e5e7eb;
    }

    #sec-site-contents .cx-accordion-card {
        aspect-ratio: 1 / 1;
        min-height: 160px;
        width: 100% !important;
        border: 0;
        border-right: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
        border-radius: 0;
        background: #111827 !important;
        box-shadow: none;
    }

    #sec-site-contents .cx-accordion-card img {
        position: absolute;
        inset: 0;
        z-index: 0;
        opacity: 0;
        transform: scale(1.08);
        transition: opacity 0.35s ease, transform 0.45s ease;
    }

    #sec-site-contents .cx-accordion-card:hover img,
    #sec-site-contents .cx-accordion-card:active img {
        opacity: 1;
        transform: scale(1);
    }

    #sec-site-contents .cx-accordion-card > .absolute.inset-0 {
        z-index: 1;
        background: #fff !important;
        transition: opacity 0.35s ease, transform 0.35s ease, background-color 0.35s ease;
        transform-origin: center;
    }

    #sec-site-contents .cx-accordion-card > .absolute.inset-0::after {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(17, 24, 39, 0.35);
        opacity: 0;
        transition: opacity 0.35s ease;
    }

    #sec-site-contents .cx-accordion-card:hover > .absolute.inset-0,
    #sec-site-contents .cx-accordion-card:active > .absolute.inset-0 {
        opacity: 0.82;
        transform: scale(0.94) translateY(4px);
        background: rgba(255, 255, 255, 0.82) !important;
    }

    #sec-site-contents .cx-accordion-card .absolute.top-6 {
        top: 42px !important;
        left: 12px !important;
        right: 12px !important;
        z-index: 2;
        text-align: center;
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    #sec-site-contents .cx-accordion-card .absolute.top-6 span {
        background: transparent !important;
        border: 0 !important;
        color: #FF5C00 !important;
        display: block;
        font-size: 0 !important;
        letter-spacing: 0 !important;
        padding: 0 !important;
        text-align: center;
    }

    #sec-site-contents .cx-accordion-card:nth-child(1) .absolute.top-6 span::before { content: "CORPORATE"; }
    #sec-site-contents .cx-accordion-card:nth-child(2) .absolute.top-6 span::before { content: "SERVICE"; }
    #sec-site-contents .cx-accordion-card:nth-child(3) .absolute.top-6 span::before { content: "POSITIONS"; }
    #sec-site-contents .cx-accordion-card:nth-child(4) .absolute.top-6 span::before { content: "MEMBERS"; }

    #sec-site-contents .cx-accordion-card .absolute.top-6 span::before {
        display: block;
        font-family: 'Poppins', sans-serif;
        font-size: 11px;
        font-weight: 900;
        letter-spacing: 0.18em;
        text-align: center;
    }

    #sec-site-contents .cx-accordion-card .absolute.bottom-8 {
        top: 50% !important;
        left: 12px !important;
        right: 12px !important;
        bottom: auto !important;
        transform: translateY(-5%);
        width: auto !important;
        max-width: none !important;
        z-index: 2;
        text-align: center;
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    #sec-site-contents .cx-accordion-card h3 {
        color: #111827 !important;
        font-size: 17px !important;
        line-height: 1.45 !important;
        letter-spacing: 0 !important;
        padding-right: 0;
        text-align: center;
    }

    #sec-site-contents .cx-card-detail {
        display: none !important;
    }

    #sec-site-contents .cx-view-more-box {
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin-top: 12px;
        color: #FF5C00 !important;
    }

    #sec-site-contents .cx-view-more-box span {
        display: none !important;
    }

    #sec-site-contents .cx-view-more-box i {
        color: #FF5C00 !important;
        font-size: 13px !important;
        margin-left: 0 !important;
    }

    #sec-site-contents .cx-accordion-card:hover .absolute.top-6,
    #sec-site-contents .cx-accordion-card:active .absolute.top-6,
    #sec-site-contents .cx-accordion-card:hover .absolute.bottom-8,
    #sec-site-contents .cx-accordion-card:active .absolute.bottom-8 {
        opacity: 0.86;
        transform: scale(0.94) translateY(4px);
    }

    #sec-site-contents .cx-accordion-card:hover .absolute.bottom-8,
    #sec-site-contents .cx-accordion-card:active .absolute.bottom-8 {
        transform: translateY(-5%) scale(0.94) translateY(4px);
    }
}

/* ==========================================================================
   Crestix Careers - Job Diagnosis Style System
   ========================================================================== */
.diag-step-header {
    padding-top: 10px;
}
.diag-step-subtitle {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: #FF5C00;
    display: block;
    margin-bottom: 8px;
}
.diag-step-number {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #1A2B4C;
    display: block;
    margin-bottom: 12px;
}
.diag-step-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 900;
    color: #1A2B4C;
    letter-spacing: -0.02em;
}
.diag-abbr {
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: -0.04em;
    line-height: 1;
}
.diag-abbr.is-small {
    font-size: clamp(2.2rem, 8vw, 3.6rem);
    letter-spacing: -0.05em;
}
.diag-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1A2B4C;
    margin-top: 16px;
    display: block;
}
.diag-underline {
    width: 40px;
    height: 2px;
    background-color: #D1D5DB;
    margin: 8px auto 16px;
}
.diag-desc {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.7;
    font-weight: 500;
}

/* ==========================================================================
   Service pages image containment
   ========================================================================== */
.content-section .aspect-\[4\/3\],
.content-section .aspect-\[16\/9\],
.content-section .aspect-square,
.service-card-image,
.service-visual,
.service-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.content-section .aspect-\[4\/3\] > img,
.content-section .aspect-\[16\/9\] > img,
.content-section .aspect-square > img,
.service-card-image > img,
.service-visual > img,
.service-image-wrap > img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center bottom;
}

.content-section .aspect-\[4\/3\] > img.object-cover,
.content-section .aspect-\[16\/9\] > img.object-cover,
.content-section .aspect-square > img.object-cover {
    object-fit: contain !important;
}

/* ==========================================================================
   Business Grid — 非ホバー: 白地に薄文字 / ホバー: 全画面背景動画
   ========================================================================== */
.biz-grid-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #fff;
    overflow: hidden;
}

/* 全画面背景レイヤー */
.biz-grid__videos {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    background: #fff;
}

.biz-grid__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.04);
    transition:
        opacity 0.6s ease,
        visibility 0.6s ease,
        transform 1.2s ease;
}

.biz-grid__video.is-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.biz-grid__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.12) 0%,
        rgba(0, 0, 0, 0.48) 100%
    );
    opacity: 0;
    transition: opacity 0.45s ease;
}

.biz-grid-section.is-hovering .biz-grid__overlay {
    opacity: 1;
}

/* 4分割セル */
.biz-grid__cells {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    min-height: 100vh;
}

.biz-grid__cell {
    position: relative;
    min-height: 50vh;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98);
    border-right: 1px solid rgba(15, 23, 42, 0.1);
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    transition: background 0.45s ease, border-color 0.45s ease;
}

.biz-grid__cell-video,
.biz-grid__cell-overlay {
    display: none;
}

/* ホバー時はセル背景を透明にして全体背景を見せる */
.biz-grid-section.is-hovering .biz-grid__cell {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.18);
}

/* テキスト */
.biz-grid__content {
    position: relative;
    z-index: 4;
    text-align: center;
    padding: 24px;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

/* 非ホバー時：事業名を黒で表示 */
.biz-grid__title {
    font-size: clamp(38px, 5vw, 72px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.06em;
    color: #0f172a;
    text-shadow: none;
    transition:
        color 0.45s ease,
        text-shadow 0.45s ease,
        transform 0.45s ease;
}

.biz-grid__sub {
    display: block;
    margin-top: 18px;
    font-size: 13px;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.6);
    transition: color 0.45s ease;
}

/* ホバー中のアクティブカード */
.biz-grid__cell.is-active .biz-grid__content {
    transform: translateY(-4px);
}

.biz-grid__cell.is-active .biz-grid__title {
    color: #fff;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    transform: scale(1.02);
}

.biz-grid__cell.is-active .biz-grid__sub {
    color: rgba(255, 255, 255, 0.9);
}

/* ホバー中の非アクティブカード */
.biz-grid__cell.is-dimmed .biz-grid__content {
    opacity: 0.18;
}

.biz-grid__cell.is-dimmed .biz-grid__title {
    color: rgba(255, 255, 255, 0.35);
}

.biz-grid__cell.is-dimmed .biz-grid__sub {
    color: rgba(255, 255, 255, 0.3);
}

/* タブレット/スマホ: 各カード内に背景動画を内包 */
@media (max-width: 1024px) {
    .biz-grid-section {
        min-height: auto;
        background: #fff;
        padding: 72px 32px;
        overflow: visible;
    }

    .biz-grid__videos {
        display: none !important;
    }

    .biz-grid__cells {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
        min-height: auto;
    }

    .biz-grid__cell {
        min-height: 420px;
        width: 100%;
        border: none;
        border-radius: 32px;
        overflow: hidden;
        background: #111;
        display: flex;
        align-items: flex-end;
        justify-content: flex-start;
        padding: 0;
        box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
    }

    .biz-grid-section.is-hovering .biz-grid__cell,
    .biz-grid__cell.is-active,
    .biz-grid__cell.is-dimmed {
        opacity: 1;
        background: #111;
        border-color: transparent;
    }

    .biz-grid__cell-video {
        display: block !important;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 1;
        visibility: visible;
        z-index: 1;
    }

    .biz-grid__cell-overlay {
        display: block !important;
        position: absolute;
        inset: 0;
        z-index: 2;
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.16) 0%,
            rgba(0, 0, 0, 0.68) 100%
        );
    }

    .biz-grid__content,
    .biz-grid__cell.is-active .biz-grid__content,
    .biz-grid__cell.is-dimmed .biz-grid__content {
        position: relative;
        z-index: 3;
        width: 100%;
        padding: 28px;
        text-align: left;
        opacity: 1;
        transform: none !important;
    }

    .biz-grid__title,
    .biz-grid__cell.is-active .biz-grid__title,
    .biz-grid__cell.is-dimmed .biz-grid__title {
        color: #fff;
        opacity: 1;
        font-size: clamp(32px, 7vw, 48px);
        line-height: 1.05;
        text-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
        transform: none;
    }

    .biz-grid__sub,
    .biz-grid__cell.is-active .biz-grid__sub,
    .biz-grid__cell.is-dimmed .biz-grid__sub {
        color: rgba(255, 255, 255, 0.82);
        margin-top: 12px;
    }
}

@media (max-width: 768px) {
    .biz-grid-section {
        padding: 56px 18px;
    }

    .biz-grid__cells {
        display: flex;
        flex-direction: column;
        gap: 22px;
    }

    .biz-grid__cell {
        min-height: 360px;
        border-radius: 28px;
    }

    .biz-grid__title,
    .biz-grid__cell.is-active .biz-grid__title,
    .biz-grid__cell.is-dimmed .biz-grid__title {
        font-size: clamp(32px, 9vw, 48px);
    }

    .service-img-wrap {
        width: 100% !important;
        height: 220px !important;
    }
}

/* ==========================================================================
   CRESTORY latest thumbnail cards
   ========================================================================== */
.corp-crestory__grid,
.crestory-thumb-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 1180px;
    margin: 0 auto;
}

.corp-crestory__card,
.crestory-thumb-card {
    display: block;
    text-decoration: none;
    isolation: isolate;
    transition: transform 0.35s ease;
    border-radius: 6px;
    overflow: hidden;
}

.corp-crestory__card:hover,
.crestory-thumb-card:hover {
    transform: translateY(-4px);
}

/* サムネイル画像ラッパー */
.corp-crestory__thumb,
.crestory-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background: #0A0F1E;
    box-shadow: none;
    transition: box-shadow 0.35s ease;
}

.corp-crestory__card:hover .corp-crestory__thumb,
.crestory-thumb-card:hover .crestory-thumb-wrap {
    box-shadow: none;
}

.corp-crestory__thumb img,
.crestory-thumb-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: none;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.corp-crestory__card:hover .corp-crestory__thumb img,
.crestory-thumb-card:hover .crestory-thumb-wrap img {
    transform: scale(1.04);
    opacity: 0.85;
}

.corp-crestory__thumb::after,
.crestory-thumb-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0) 40%);
    opacity: 0.6;
    transition: opacity 0.35s ease;
}

.corp-crestory__card:hover .corp-crestory__thumb::after,
.crestory-thumb-card:hover .crestory-thumb-wrap::after {
    opacity: 0.85;
}

.crestory-thumb-label {
    display: none;
}

.corp-crestory__card-title,
.crestory-thumb-title {
    display: none;
}

/* スケルトン */
.crestory-thumb-skeleton {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.12), rgba(255,255,255,0.04)),
        #121A2A;
    background-size: 220% 100%;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
    animation: crestoryThumbLoading 1.4s ease-in-out infinite;
}

@media (max-width: 768px) {
    .corp-crestory__grid,
    .crestory-thumb-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ==========================================================================
   Service detail image/text rows
   ========================================================================== */
.service-detail-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 3rem 0;
    border-bottom: 1px solid var(--gray-line);
}

.service-detail-section:last-child {
    border-bottom: none;
}

@media (min-width: 768px) {
    .service-detail-section {
        flex-direction: row;
        align-items: center;
        gap: 3rem;
    }
}

.service-detail-section--reverse {
    flex-direction: row-reverse;
}

.service-detail-section__image {
    flex-shrink: 0;
    width: 100%;
}

@media (min-width: 768px) {
    .service-detail-section__image {
        width: 300px;
    }
}

.service-detail-section__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
}

@media (min-width: 768px) {
    .service-detail-section__text {
        padding: 2rem 0 2rem 2rem;
    }
}

.service-detail-section__text > span[class*="inline-block"],
.service-detail-section__text > [class*="-tag"],
.service-detail-section__text > .tag,
.service-tag,
.diagnosis-tag {
    display: inline-block !important;
    width: auto !important;
    max-width: max-content;
    align-self: flex-start !important;
    flex: 0 0 auto !important;
}

.service-detail-section__title {
    word-break: keep-all;
    overflow-wrap: break-word;
}

.service-detail-section__desc {
    word-break: keep-all;
    overflow-wrap: break-word;
}

@keyframes crestoryThumbLoading {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}

/* ==========================================================================
   Mobile readability refinements
   Scope: homepage diagnostic / content cards / Crestory feed / footer
   ========================================================================== */
@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
    }

    /* ── Mobile hero layout ─────────────────────────────────── */
    #sec-hero {
        height: auto !important;
        min-height: 100svh !important;
        overflow: visible !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .hero-content {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        z-index: 10;
        margin-top: auto !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 0 !important;
        padding-bottom: max(24px, env(safe-area-inset-bottom)) !important;
    }

    /* ── Diagnostic header spacing ──────────────────────────── */
    /* ヘッダー余白圧縮 */
    .diag-step-header {
        padding-top: 0 !important;
        margin-bottom: 20px !important;
    }
    .diag-step-subtitle {
        margin-bottom: 4px !important;
    }
    .diag-step-number {
        margin-bottom: 6px !important;
        font-size: 0.85rem !important;
    }
    .diag-step-title {
        font-size: 1.8rem !important;
        letter-spacing: -0.01em !important;
    }

    /* Grids for steps */
    .diag-step--categories > .grid,
    .diag-step--stages > .grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        max-width: 365px;
        margin: 0 auto;
    }

    .diag-step--roles > .grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
        max-width: 100% !important;
        margin: 0 auto;
    }

    /* Card standard styles on mobile (Step 1 and Step 3) */
    .diag-step--categories .diag-option-card,
    .diag-step--stages .diag-option-card {
        width: 100% !important;
        min-height: auto !important;
        padding: 16px 20px !important;
        border-radius: 16px !important;
    }
    .diag-step--categories .diag-abbr,
    .diag-step--stages .diag-abbr {
        font-size: 2.2rem !important;
    }
    .diag-step--categories .diag-title,
    .diag-step--stages .diag-title {
        font-size: 0.95rem !important;
        margin-top: 8px !important;
    }
    .diag-step--categories .diag-underline,
    .diag-step--stages .diag-underline {
        margin: 4px auto 8px !important;
    }
    .diag-step--categories .diag-desc,
    .diag-step--stages .diag-desc {
        font-size: 0.8rem !important;
        line-height: 1.5 !important;
    }

    /* Card Step 2 compact layout on mobile */
    .diag-step--roles .diag-option-card {
        width: 100% !important;
        height: 72px !important;
        min-height: 72px !important;
        padding: 12px 10px !important;
        border-radius: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }
    .diag-step--roles .diag-abbr {
        font-size: 0.75rem !important;
        margin-bottom: 2px !important;
    }
    .diag-step--roles .diag-title {
        font-size: 0.9rem !important;
        margin-top: 0 !important;
        line-height: 1.2 !important;
    }
    .diag-step--roles .diag-underline {
        display: none !important;
    }
    .diag-step--roles .diag-desc {
        display: none !important;
    }
    .diag-step--roles .diag-check-tab {
        width: 24px !important;
        height: 24px !important;
        border-bottom-left-radius: 8px !important;
        border-top-right-radius: 12px !important;
    }
    .diag-step--roles .diag-check-tab i {
        font-size: 9px !important;
    }

    /* Footer and Progress Bar mobile adjustments */
    #diag-footer {
        margin-top: 24px !important;
        padding-top: 16px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 20px !important;
    }

    #diag-footer > .flex.items-start {
        width: 100% !important;
        justify-content: space-between !important;
        overflow: hidden;
    }

    #diag-footer > .flex.items-start > .flex {
        width: 25% !important;
        min-width: 0;
    }

    #diag-footer > .flex.items-start span:first-of-type {
        display: none !important;
    }

    #diag-footer > .flex.items-start span:nth-of-type(2) {
        display: block !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        font-family: 'Poppins', sans-serif !important;
        margin-top: 6px !important;
    }

    #diag-footer > div:last-child {
        width: 100% !important;
        justify-content: center !important;
        gap: 12px !important;
    }

    /* display controlled by JS — do NOT set display on #diag-back */
    #diag-back {
        height: 48px !important;
        min-height: 48px !important;
        padding: 0 24px !important;
        border-radius: 9999px !important;
        font-size: 0.9rem !important;
        font-weight: 800 !important;
        width: 140px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #diag-next {
        height: 48px !important;
        min-height: 48px !important;
        padding: 0 24px !important;
        border-radius: 9999px !important;
        font-size: 0.9rem !important;
        font-weight: 800 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 168px !important;
    }

    #diag-step-4 > div {
        gap: 20px !important;
    }

    #diag-step-4 h3 {
        text-align: left;
        margin-inline: 0;
        max-width: 100%;
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    #diag-step-4 p {
        max-width: 100%;
        font-size: 14px !important;
        line-height: 1.8 !important;
    }

    #diag-step-4 a,
    #diag-step-4 button {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        padding: 12px 20px !important;
        white-space: normal !important;
        text-align: center;
    }

    #sec-site-contents {
        padding: 56px 0 64px !important;
    }

    #sec-site-contents > .max-w-\[1400px\] {
        padding-left: 20px !important;
        padding-right: 20px !important;
        margin-bottom: 28px !important;
    }

    #sec-site-contents h2 {
        font-size: 28px !important;
        line-height: 1.35 !important;
    }

    #sec-site-contents .cx-contents-flex-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0 !important;
        width: calc(100% - 20px) !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    #sec-site-contents .cx-accordion-card {
        aspect-ratio: 1 / 1;
        border-radius: 0;
        min-height: 160px;
    }

    #sec-site-contents .cx-accordion-card .absolute.top-6 {
        top: 42px !important;
        left: 12px !important;
        right: 12px !important;
    }

    #sec-site-contents .cx-accordion-card .absolute.top-6 span {
        font-size: 0 !important;
        letter-spacing: 0 !important;
        padding: 0 !important;
    }

    #sec-site-contents .cx-accordion-card .absolute.bottom-8 {
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
    }

    #sec-site-contents .cx-accordion-card h3 {
        font-size: 17px !important;
        line-height: 1.45 !important;
        letter-spacing: 0 !important;
        text-align: center !important;
    }

    #sec-site-contents .cx-card-detail {
        display: none !important;
    }

    #sec-site-contents .cx-view-more-box {
        display: flex !important;
    }

    #sec-youtube-carousel {
        padding: 58px 0 68px !important;
    }

    #sec-youtube-carousel .max-w-\[1400px\] {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    #sec-youtube-carousel .grid {
        grid-template-columns: 1fr !important;
        gap: 22px !important;
        max-width: 390px !important;
        margin-inline: auto;
    }

    #sec-youtube-carousel a.group {
        aspect-ratio: 16 / 12 !important;
        border-radius: 24px !important;
    }

    #sec-youtube-carousel a.group .absolute.bottom-8 {
        left: 22px !important;
        right: 22px !important;
        bottom: 22px !important;
    }

    #sec-youtube-carousel h3 {
        font-size: 20px !important;
        line-height: 1.45 !important;
    }

    #sec-youtube-carousel .corp-crestory__grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        max-width: 480px !important;
        margin-inline: auto !important;
    }

    #sec-youtube-carousel .corp-crestory__thumb,
    #sec-youtube-carousel .corp-crestory__skeleton {
        border-radius: 12px !important;
    }

    .crestory-thumb-label {
        top: 10px;
        left: 10px;
        padding: 5px 9px;
        font-size: 8px;
        letter-spacing: 0.16em;
    }

    .crestory-thumb-title {
        font-size: 13px;
    }

    .news-feed-main {
        padding: 58px 20px 72px !important;
    }

    .news-feed-main > .max-w-7xl {
        max-width: 390px !important;
    }

    .news-feed-main h2 {
        font-size: 30px !important;
        line-height: 1.35 !important;
        letter-spacing: 0 !important;
    }

    .news-feed-main p {
        font-size: 14px !important;
        line-height: 1.9 !important;
    }

    .news-feed-main [data-news-tab] {
        min-height: 46px;
        flex: 1 1 0;
        padding: 12px 14px !important;
        font-size: 12px !important;
        letter-spacing: 0.12em !important;
    }

    .news-feed-main [data-all-grid],
    .news-feed-main [data-youtube-grid],
    .news-feed-main [data-note-rss-grid] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        max-width: 390px !important;
        margin-inline: auto;
    }

    .news-media-card {
        border-radius: 24px !important;
        max-width: 390px;
        margin-inline: auto;
    }

    .news-media-card > div:first-child {
        aspect-ratio: 16 / 9 !important;
    }

    .news-media-card > div:last-child {
        min-height: auto !important;
        padding: 24px !important;
    }

    .news-media-card time {
        font-size: 12px !important;
        margin-bottom: 12px !important;
    }

    .news-media-card h3 {
        font-size: 18px !important;
        line-height: 1.55 !important;
        letter-spacing: 0 !important;
        margin-bottom: 14px !important;
    }

    .news-media-card p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 14px !important;
        line-height: 1.85 !important;
        margin-bottom: 22px !important;
    }

    footer .py-14,
    footer .py-16 {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }

    footer .px-10 {
        padding-left: 22px !important;
        padding-right: 22px !important;
    }

    footer .grid {
        gap: 30px 22px !important;
    }

    footer a,
    footer button {
        min-height: 36px;
        line-height: 1.5;
    }

    footer li a,
    footer li button {
        font-size: 13px !important;
    }

    footer .tracking-\[0\.3em\] {
        letter-spacing: 0.14em !important;
    }
}

@media (max-width: 430px) {
    #sec-site-contents .cx-contents-flex-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0 !important;
    }

    #sec-site-contents .cx-accordion-card {
        min-height: 150px;
    }

    #sec-site-contents .cx-accordion-card h3 {
        font-size: 16px !important;
    }
}


/* Diagnostic form polish */
#sec-diagnostic .diag-step-header {
    margin-bottom: 44px;
}
#sec-diagnostic .diag-step-subtitle,
#sec-diagnostic .diag-step-number,
#sec-diagnostic .diag-step-title {
    display: block;
}
#sec-diagnostic .diag-step-subtitle {
    color: #6B7280;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}
#sec-diagnostic .diag-step-number {
    font-family: Poppins, sans-serif;
    color: #FF5C00;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
    text-transform: uppercase;
}
#sec-diagnostic .diag-step-title {
    color: #1A2B4C;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.02em;
}
#sec-diagnostic .diag-option-card {
    min-height: 190px;
    padding: 34px 32px !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-color: #E2E8F0;
    box-shadow: none;
}
#sec-diagnostic .diag-option-card[aria-pressed="true"] {
    border-color: #FF5C00 !important;
    box-shadow: 0 0 0 3px rgba(255,92,0,0.15) !important;
}
#sec-diagnostic .diag-option-card:not([aria-pressed="true"]):hover {
    border-color: #CBD5E1 !important;
}
#sec-diagnostic .diag-title {
    display: block;
    color: #1A2B4C;
    font-size: clamp(1.15rem, 1.7vw, 1.45rem);
    font-weight: 900;
    line-height: 1.42;
    letter-spacing: 0;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
#sec-diagnostic .diag-underline {
    width: 34px;
    height: 3px;
    border-radius: 999px;
    margin: 14px auto 16px;
    background: #D1D5DB;
}
#sec-diagnostic .diag-desc {
    color: #6B7280;
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.75;
    max-width: 320px;
    margin: 0 auto;
}
#sec-diagnostic .diag-step--roles > .grid,
#sec-diagnostic .diag-step--positions > .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1180px;
    margin-inline: auto;
}
#sec-diagnostic .diag-step--roles .diag-option-card,
#sec-diagnostic .diag-step--positions .diag-option-card {
    min-height: 200px;
    padding: 42px 36px !important;
}
#sec-diagnostic .diag-step--roles .diag-title,
#sec-diagnostic .diag-step--positions .diag-title {
    font-size: clamp(1.12rem, 1.45vw, 1.38rem);
}
#sec-diagnostic .diag-step--roles .diag-desc,
#sec-diagnostic .diag-step--positions .diag-desc {
    display: block;
}
#sec-diagnostic .diag-step--roles .diag-underline,
#sec-diagnostic .diag-step--positions .diag-underline {
    margin: 14px auto 16px;
}
#sec-diagnostic #diag-footer {
    margin-top: 52px;
    padding-top: 28px;
    align-items: center;
    justify-content: center;
    gap: 36px;
}
#sec-diagnostic #diag-footer > .flex.items-start {
    width: min(860px, 100%);
    max-width: 100%;
    flex: 1 1 760px;
}
#sec-diagnostic #diag-footer > .flex.items-start > div[style*="position:absolute"] {
    top: 9px !important;
    height: 3px !important;
    left: 10px !important;
    right: 10px !important;
}
#sec-diagnostic [id^="pbar-dot-"] {
    width: 20px !important;
    height: 20px !important;
    border-width: 3px !important;
}
#sec-diagnostic #diag-footer span {
    text-align: center;
}
#sec-diagnostic #diag-footer span[style*="font-size:0.65rem"] {
    font-size: 0.72rem !important;
    letter-spacing: 0.16em !important;
    margin-top: 12px !important;
}
#sec-diagnostic #diag-footer span[style*="font-size:0.75rem"] {
    font-size: 0.78rem !important;
    color: inherit;
}
#sec-diagnostic #diag-back {
    min-height: 42px !important;
    padding: 0 22px !important;
    border-radius: 9999px !important;
    border-color: #E5E7EB !important;
    background: #fff !important;
    color: #6B7280 !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    box-shadow: none !important;
}
#sec-diagnostic #diag-back:hover {
    color: #1A2B4C !important;
    border-color: #CBD5E1 !important;
}
@media (max-width: 768px) {
    #sec-diagnostic {
        padding-bottom: 32px !important;
    }
    #diagnostic-container,
    #diag-step-1,
    #diag-step-2,
    #diag-step-3,
    #diag-step-4,
    #diag-footer,
    #diag-footer > .flex.items-start {
        height: auto !important;
        min-height: 0 !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    #diag-step-1.hidden,
    #diag-step-2.hidden,
    #diag-step-3.hidden,
    #diag-step-4.hidden {
        display: none !important;
    }
    #sec-diagnostic .diag-step-header {
        margin-bottom: 24px !important;
    }
    #sec-diagnostic .diag-step-subtitle {
        font-size: 0.83rem !important;
        margin-bottom: 7px !important;
    }
    #sec-diagnostic .diag-step-number {
        font-size: 0.82rem !important;
        margin-bottom: 8px !important;
    }
    #sec-diagnostic .diag-step-title {
        font-size: clamp(1.65rem, 7vw, 2rem) !important;
        line-height: 1.35 !important;
    }
    #sec-diagnostic .diag-option-card {
        min-height: auto !important;
        padding: 22px 20px !important;
        border-radius: 16px !important;
    }
    #sec-diagnostic .diag-step--roles > .grid,
    #sec-diagnostic .diag-step--positions > .grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        max-width: 365px !important;
        margin-inline: auto !important;
    }
    #sec-diagnostic .diag-step--roles .diag-option-card,
    #sec-diagnostic .diag-step--positions .diag-option-card {
        min-height: auto !important;
        padding: 16px 20px !important;
        border-radius: 16px !important;
    }
    #sec-diagnostic .diag-step--roles .diag-title,
    #sec-diagnostic .diag-step--positions .diag-title {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
    }
    #sec-diagnostic .diag-step--roles .diag-underline,
    #sec-diagnostic .diag-step--positions .diag-underline {
        display: block !important;
        width: 34px !important;
        height: 2px !important;
        margin: 4px auto 8px !important;
    }
    #sec-diagnostic .diag-step--roles .diag-desc,
    #sec-diagnostic .diag-step--positions .diag-desc {
        display: block !important;
        font-size: 0.8rem !important;
        line-height: 1.5 !important;
    }
    #sec-diagnostic #diag-footer {
        margin-top: 28px !important;
        padding-top: 20px !important;
        gap: 18px !important;
        align-items: center !important;
        flex-wrap: wrap !important;
    }
    #sec-diagnostic #diag-footer > .flex.items-start {
        width: min(480px, 100%) !important;
        max-width: 100% !important;
        flex: 0 1 auto !important;
        flex-basis: auto !important;
    }
    #sec-diagnostic [id^="pbar-dot-"] {
        width: 18px !important;
        height: 18px !important;
    }
    #sec-diagnostic #diag-back {
        width: auto !important;
        min-width: 112px !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 18px !important;
    }
}

#sec-diagnostic #diag-step-4 .diag-result-title {
    font-size: clamp(28px, 5vw, 56px) !important;
    font-weight: 900;
    line-height: 1.25 !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
}

#sec-diagnostic #diag-step-4 .diag-result-prefix {
    display: inline !important;
}

#sec-diagnostic #diag-step-4 .diag-result-value {
    display: inline !important;
    white-space: nowrap !important;
}

#sec-diagnostic #diag-step-4 .diag-result-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: min(1180px, 100%);
    margin: 0 auto;
    align-items: stretch;
}

@media (max-width: 768px) {
    #sec-diagnostic #diag-step-4 .diag-result-title {
        font-size: clamp(28px, 8vw, 38px) !important;
    }

    #sec-diagnostic #diag-step-4 .diag-result-cards {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* ==========================================
   CRESTORYセクション 画像カードグリッド
   ========================================== */
.corp-crestory__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.corp-crestory__card {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
}

.corp-crestory__thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #1a2b4c;
}

.corp-crestory__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.corp-crestory__card:hover .corp-crestory__thumb img {
    transform: scale(1.04);
}

.corp-crestory__skeleton {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.1), rgba(255,255,255,0.04)),
        #1a2b4c;
    background-size: 220% 100%;
    animation: crestoryThumbLoading 1.4s ease-in-out infinite;
}

@media (max-width: 1024px) {
    .corp-crestory__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .corp-crestory__grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   サービス詳細 画像ラッパー
   ========================================== */
.service-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    background: #f3f4f6;
    overflow: hidden;
}

.service-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
