
/* Final integration additions */
.notice-error {
    background: #fff1ef;
    border: 1px solid #e8c1bb;
    color: #713f38;
}

.form-consent {
    margin-top: 28px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    font-size: 14px;
}

.form-consent p {
    margin: 0;
}

.form-consent a {
    text-decoration: underline;
    font-weight: 700;
}

.complete-box {
    text-align: center;
}

.complete-box .hero-actions {
    justify-content: center;
}

.receipt-number {
    display: inline-block;
    margin: 24px 0 34px;
    padding: 14px 20px;
    background: var(--soft);
    border-radius: 10px;
}

.document-item {
    padding: 26px 0;
    border-bottom: 1px solid var(--line);
}

.document-item > strong {
    display: block;
    font-size: 20px;
    margin-bottom: 10px;
}

.faq-item {
    border-top: 1px solid var(--line);
    background: transparent;
}

.faq-item:last-child {
    border-bottom: 1px solid var(--line);
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    position: relative;
    padding: 24px 54px 24px 0;
    font-weight: 800;
    font-size: 18px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 10px;
    top: 17px;
    font-size: 30px;
    font-weight: 400;
    color: var(--primary-dark);
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item .prose {
    padding: 0 0 24px;
}

@media (max-width: 640px) {
    .form-consent {
        font-size: 13px;
    }

    .faq-item summary {
        font-size: 17px;
    }
}


/* =========================================================
   Visual QA final adjustments
   2026-09-08
   ========================================================= */

/* Japanese heading balance */
.display,
.section-title,
.quote,
.page-hero h1,
.final-cta h2 {
    line-break: strict;
    text-wrap: balance;
    hanging-punctuation: allow-end;
}

/* HERO: prevent awkward Japanese character-by-character wrapping */
@media (min-width: 1200px) {
    .hero {
        grid-template-columns: minmax(660px, 1fr) minmax(0, 1fr);
        gap: 42px;
        padding-left: 44px;
        padding-right: 44px;
    }

    .hero-copy {
        padding-left: max(0px, calc((100vw - 1240px) / 2 - 34px));
    }

    .hero-copy .display {
        font-size: clamp(70px, 5.35vw, 82px);
        line-height: 1.22;
        letter-spacing: -0.045em;
        word-break: keep-all;
        overflow-wrap: normal;
        max-width: 720px;
    }

    .hero-copy p {
        max-width: 600px;
    }

    .hero-photo img {
        height: min(70vh, 720px);
    }
}

/* Medium desktop / small laptop */
@media (min-width: 981px) and (max-width: 1199px) {
    .hero {
        grid-template-columns: minmax(520px, 1fr) minmax(0, .92fr);
        gap: 34px;
        padding-left: 30px;
        padding-right: 30px;
    }

    .hero-copy .display {
        font-size: clamp(58px, 5.6vw, 68px);
        line-height: 1.24;
        letter-spacing: -0.04em;
        word-break: keep-all;
        overflow-wrap: normal;
    }

    .hero-photo img {
        height: min(66vh, 650px);
    }
}

/* Section headings: keep editorial feel without accidental 1–2 character lines */
@media (min-width: 981px) {
    .section-title {
        max-width: 820px;
    }

    .split > div:first-child .section-title,
    .philosophy-grid > div:first-child .section-title {
        font-size: clamp(44px, 4vw, 58px);
        line-height: 1.34;
    }

    .page-hero .section-title {
        font-size: clamp(46px, 4.2vw, 60px);
        line-height: 1.32;
        max-width: 760px;
    }
}

/* Tablet and smartphone */
@media (max-width: 980px) {
    :root {
        --section: 80px;
    }

    .hero {
        gap: 34px;
        padding-bottom: 70px;
    }

    .hero-copy .display {
        font-size: clamp(44px, 11.5vw, 58px);
        line-height: 1.28;
        letter-spacing: -0.035em;
        word-break: keep-all;
        overflow-wrap: normal;
    }

    .section-title {
        font-size: clamp(34px, 8.7vw, 42px);
        line-height: 1.38;
        letter-spacing: -0.025em;
    }

    .page-hero .section-title {
        font-size: clamp(36px, 9vw, 44px);
        line-height: 1.36;
    }

    .organic-photo img,
    .testimonial img {
        height: min(390px, 82vw);
    }

    .mobile-cta a {
        min-height: 64px;
        font-size: 14px;
        line-height: 1.3;
        padding: 6px 5px;
    }
}

@media (max-width: 640px) {
    :root {
        --section: 74px;
    }

    .hero-photo img {
        height: 44vh;
        min-height: 320px;
    }

    .hero-copy {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-copy .display {
        font-size: clamp(42px, 11.3vw, 50px);
        line-height: 1.3;
    }

    .lead {
        font-size: 17px;
        line-height: 1.9;
    }

    .page-hero {
        padding: 58px 0 68px;
    }

    .page-hero img {
        height: 300px;
    }

    .career-number {
        font-size: 88px;
    }

    .final-cta {
        padding: 82px 0;
    }
}


/* =========================================================
   FINAL VISUAL QA PATCH
   Hero overlap prevention + typography balance
   ========================================================= */

/* The hero title is explicitly separated by CMS line breaks.
   Each line must stay inside the copy column. */
.hero-copy {
    min-width: 0;
    position: relative;
    z-index: 2;
}

.hero-photo {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.hero-title {
    max-width: 100%;
}

.hero-title > span {
    display: block;
}

/* Desktop: preserve two-line editorial composition without colliding with photo */
@media (min-width: 1200px) {
    .hero {
        grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
        gap: 52px;
        padding-left: 64px;
        padding-right: 46px;
    }

    .hero-copy {
        padding-left: max(0px, calc((100vw - 1280px) / 2));
    }

    .hero-copy .display {
        font-size: clamp(56px, 4.25vw, 76px);
        line-height: 1.28;
        letter-spacing: -0.045em;
    }

    .hero-title > span {
        white-space: nowrap;
    }

    .hero-copy p {
        max-width: 590px;
        margin-top: 28px;
    }

    .hero-photo img {
        height: min(68vh, 700px);
    }
}

/* Common notebook / 1024–1199px */
@media (min-width: 981px) and (max-width: 1199px) {
    .hero {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
        gap: 36px;
        padding-left: 38px;
        padding-right: 30px;
    }

    .hero-copy {
        padding-left: 0;
    }

    .hero-copy .display {
        font-size: clamp(48px, 4.8vw, 56px);
        line-height: 1.3;
        letter-spacing: -0.04em;
    }

    .hero-title > span {
        white-space: nowrap;
    }

    .hero-photo img {
        height: min(64vh, 620px);
    }
}

/* Tablet */
@media (max-width: 980px) and (min-width: 641px) {
    .hero-title > span {
        white-space: normal;
    }

    .hero-copy .display {
        font-size: clamp(46px, 8vw, 58px);
        line-height: 1.3;
    }
}

/* Smartphone: prioritize readability over oversized type */
@media (max-width: 640px) {
    .hero {
        gap: 30px;
        padding-bottom: 68px;
    }

    .hero-copy {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-copy .display {
        font-size: clamp(35px, 9.6vw, 41px);
        line-height: 1.36;
        letter-spacing: -0.035em;
    }

    .hero-title > span {
        white-space: nowrap;
    }

    .hero-copy p {
        font-size: 16px;
        line-height: 1.95;
        margin-top: 24px;
    }

    .hero-actions {
        margin-top: 28px;
    }

    .hero-actions .btn {
        min-height: 54px;
        padding-left: 22px;
        padding-right: 22px;
    }

    .hero-photo img {
        height: 43vh;
        min-height: 300px;
        max-height: 430px;
    }
}

/* Prevent any major copy block from painting over adjacent grid content */
.hero-copy,
.philosophy-grid > *,
.split > *,
.career-grid > *,
.page-hero .container > * {
    min-width: 0;
}

/* Better Japanese line wrapping outside hero */
.section-title,
.quote,
.page-hero h1,
.final-cta h2 {
    word-break: normal;
    overflow-wrap: anywhere;
}

/* Do not let desktop section headings become visually oversized */
@media (min-width: 981px) {
    .section-title {
        font-size: clamp(42px, 3.7vw, 56px);
        line-height: 1.36;
    }

    .quote {
        font-size: clamp(38px, 3.6vw, 54px);
    }
}

/* Mobile vertical rhythm */
@media (max-width: 640px) {
    :root {
        --section: 72px;
    }

    .section-title {
        font-size: clamp(32px, 8.5vw, 38px);
        line-height: 1.42;
    }

    .page-hero .section-title {
        font-size: clamp(34px, 9vw, 40px);
    }

    .page-hero img {
        height: 290px;
    }

    .organic-photo img,
    .testimonial img {
        height: min(360px, 86vw);
    }

    .final-cta {
        padding-top: 76px;
        padding-bottom: 76px;
    }
}
