:root {
    --key-color: #A40B5D;
    --key-color-dark: #7f0848;
    --key-color-soft: #f8eaf1;
    --text-color: #33282d;
    --muted-color: #756a6f;
    --border-color: #ded5d9;
    --background-color: #f5f2ef;
    --card-color: #fffdfa;
    --error-color: #b00020;
    --shadow: 0 10px 30px rgba(75, 45, 58, 0.08);

    /* 文字階層 */
    --font-page-title: clamp(1.75rem, 3vw, 2.25rem);
    --font-section-title: clamp(1.2rem, 1.7vw, 1.35rem);
    --font-field-title: 1rem;
    --font-body: 1rem;
    --font-note: 0.9rem;
    --font-small: 0.8rem;
    --line-height-body: 1.7;
}


#apply-form {
    color: var(--text-color);
    font-size: var(--font-body);
    line-height: var(--line-height-body);
}

#sub-header h2.h1 {
    margin: 0;
    font-size: var(--font-page-title);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.04em;
}

#apply-form .page > p {
    font-size: var(--font-body);
    line-height: 1.8;
}

.page {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0 80px;
}

.page-header {
    margin-bottom: 34px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--key-color);
    font-family: Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.55rem);
    font-weight: 600;
    letter-spacing: 0.07em;
}

.title-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(280px, 70%);
    margin: 18px auto;
}

.title-line span {
    display: block;
    width: 96px;
    height: 1px;
    background: #b9aaa3;
}

.title-line i {
    display: block;
    width: 8px;
    height: 8px;
    background: var(--key-color);
    border-radius: 50%;
}

.lead {
    margin: 0;
    color: var(--muted-color);
    font-size: 1rem;
}

.subscription-form {
    display: grid;
    gap: 22px;
}

.form-card,
.completion-card {
    padding: 30px;
    background: var(--card-color);
    border: 1px solid rgba(164, 11, 93, 0.12);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.form-card h2 {
    position: relative;
    margin: 0 0 24px;
    padding: 0 0 10px 16px;
    font-size: var(--font-section-title);
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.form-card h2::before {
    position: absolute;
    top: 0.25em;
    bottom: 0.55em;
    left: 0;
    width: 4px;
    background: var(--key-color);
    border-radius: 999px;
    content: "";
}

.section-note {
    margin: -14px 0 24px;
    color: var(--muted-color);
    font-size: var(--font-note);
    line-height: 1.7;
}

.form-grid {
    display: grid;
    gap: 24px;
}

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

.field {
    min-width: 0;
}

.field label,
.fieldset legend,
.field-label {
    display: block;
    margin-bottom: 8px;
    font-size: var(--font-field-title);
    font-weight: 600;
    line-height: 1.5;
}

.fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.required {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    color: var(--key-color);
    background: var(--key-color-soft);
    border-radius: 999px;
    font-family: "Yu Gothic", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: 0.12em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    min-height: 54px;
    padding: 12px 14px;
    color: var(--text-color);
    font-size: var(--font-body);
    line-height: 1.5;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

input::placeholder {
    color: #aaa1a5;
}

input:focus,
select:focus,
textarea:focus {
    background: #fff;
    border-color: var(--key-color);
    box-shadow: 0 0 0 4px rgba(164, 11, 93, 0.12);
}

.choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    min-height: 54px;
    align-items: center;
}

.choice {
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
    margin: 0 !important;
    cursor: pointer;
    font-weight: 400 !important;
}

.choice input {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--key-color);
}

.birth-row {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 10px;
}

.birth-row label {
    margin: 0;
}

.error {
    margin: 6px 0 0;
    color: var(--error-color);
    font-family: "Yu Gothic", sans-serif;
    font-size: var(--font-small);
    font-weight: 600;
    line-height: 1.6;
}

.error-summary {
    margin-bottom: 22px;
    padding: 18px 22px;
    color: var(--error-color);
    background: #fff6f7;
    border: 1px solid #e8b7c1;
    border-radius: 10px;
    font-family: "Yu Gothic", sans-serif;
}

.error-summary strong {
    display: block;
    margin-bottom: 3px;
}

.error-summary p {
    margin: 0;
}

.form-footer {
    padding: 10px 0 0;
    text-align: center;
}

.form-footer > p:first-child {
    margin: 0 0 14px;
    color: var(--muted-color);
    font-size: 0.88rem;
}

.button {
    display: inline-flex;
    min-width: min(100%, 390px);
    min-height: 58px;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: var(--font-body);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition:
        transform 0.15s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:focus-visible {
    outline: 4px solid rgba(164, 11, 93, 0.18);
    outline-offset: 3px;
}

.button-primary {
    color: #fff;
    background: var(--key-color);
    box-shadow: 0 8px 20px rgba(164, 11, 93, 0.22);
}

.button-primary:hover {
    background: var(--key-color-dark);
}

.button-secondary {
    color: var(--key-color);
    background: #fff;
    border: 1px solid var(--key-color);
}

.button-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.button-row .button {
    min-width: 0;
}

.required-note {
    margin: 13px 0 0;
    color: var(--muted-color);
    font-size: 0.82rem;
}

.required-note span {
    color: var(--key-color);
}

.confirm-list {
    margin: 0;
    border-top: 1px solid var(--border-color);
}

.confirm-list > div {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    border-bottom: 1px solid var(--border-color);
}

.confirm-list dt,
.confirm-list dd {
    margin: 0;
    padding: 16px 18px;
    font-size: var(--font-body);
    line-height: 1.7;
}

.confirm-list dt {
    background: var(--key-color-soft);
    font-weight: 600;
}

.completion-card {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.completion-card h2 {
    margin: 10px 0;
    font-size: clamp(1.35rem, 2vw, 1.55rem);
    line-height: 1.5;
}

.completion-card p {
    margin: 0 0 24px;
    color: var(--muted-color);
}

.completion-icon {
    display: grid;
    width: 68px;
    height: 68px;
    margin: 0 auto;
    place-items: center;
    color: #fff;
    background: var(--key-color);
    border-radius: 50%;
    font-family: Arial, sans-serif;
    font-size: 2rem;
    font-weight: 700;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 760px) {
    #sub-header h2.h1 {
        font-size: clamp(1.55rem, 7vw, 1.85rem);
    }

    .form-card h2 {
        font-size: 1.18rem;
    }

    .page {
        width: min(100% - 20px, 1040px);
        padding: 34px 0 50px;
    }

    .page-header {
        margin-bottom: 24px;
    }

    .two-columns {
        grid-template-columns: 1fr;
    }

    .form-card,
    .completion-card {
        padding: 22px 18px;
        border-radius: 10px;
    }

    .confirm-list > div {
        grid-template-columns: 1fr;
    }

    .confirm-list dt {
        padding-bottom: 8px;
    }

    .confirm-list dd {
        padding-top: 8px;
    }

    .button-row {
        grid-template-columns: 1fr;
    }

    .button-row .button-primary {
        order: -1;
    }
}
/* 同意欄 */
.agreement-area{
    margin:30px 0 20px;
    padding:18px 20px;
    background:#faf7f8;
    border:1px solid #e3d8de;
    border-radius:8px;
}

.agreement-label{
    display:flex;
    align-items:flex-start;
    gap:12px;
    cursor:pointer;
    font-size:var(--font-body);
    line-height:1.7;
}

.agreement-label input[type="checkbox"]{
    width:22px;
    height:22px;
    margin-top:4px;
    accent-color:#A40B5D;
    flex-shrink:0;
}

.agreement-label a{
    color:#A40B5D;
    text-decoration:none;
    font-weight:bold;
}

.agreement-label a:hover{
    text-decoration:underline;
}
.credit-notice{
    display:none;
    margin-top:15px;
    padding:14px 18px;
    color:#ff0000;
    border-radius:4px;
    line-height:1.7;
    font-size:var(--font-note);
    font-weight:600;
}
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
}

.modal.is-open {
    display: flex;
}

.modal-content {
    width: min(900px, 100%);
    max-height: 85vh;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #ddd;
}

.modal-header h2 {
    margin: 0;
    color: #A40B5D;
    font-size: var(--font-section-title);
    line-height: 1.5;
}

.modal-close {
    width: 44px;
    height: 44px;
    padding: 0;
    color: #555;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
}

.modal-close:hover {
    color: #A40B5D;
}

.modal-body {
    max-height: calc(85vh - 82px);
    padding: 24px;
    overflow-y: auto;
    line-height: 1.9;
}

body.modal-open {
    overflow: hidden;
}

.policy-load-error {
    padding: 15px;
    color: #9a153c;
    background: #fff5f8;
    border: 1px solid #e7bdcc;
    border-radius: 8px;
}
.policy{
    font-size:var(--font-body);
    line-height:1.9;
}

.policy-section{
    margin-bottom:35px;
    padding:22px;
    border:1px solid #e5d8df;
    border-radius:10px;
    background:#fff;
}

.policy-section h2{
    margin:0 0 18px;
    padding-bottom:10px;
    color:#A40B5D;
    border-bottom:2px solid #A40B5D;
    font-size:var(--font-section-title);
    line-height:1.5;
}

.policy ul{
    padding-left:22px;
}

.policy li{
    margin-bottom:8px;
}

.policy-note{
    margin-top:18px;
    padding:15px 18px;
    background:#F8EEF4;
    border-left:5px solid #A40B5D;
    border-radius:6px;
}

.policy-note.warning{
    background:#FFF8EC;
    border-left-color:#F39C12;
}

.policy-contact{
    margin-top:18px;
    padding:18px;
    background:#F6F6F6;
    border-radius:8px;
}

.policy-contact strong{
    color:#A40B5D;
}

.policy small{
    color:#777;
}
@media (max-width: 420px) {
    .birth-row {
        grid-template-columns: 1fr;
    }

    .choice-row {
        align-items: flex-start;
        flex-direction: column;
    }

    h1 {
        letter-spacing: 0.03em;
    }
}
/* ========================================
   利用規約：スマートフォン対応
======================================== */

@media screen and (max-width: 767px) {
    #apply-form .page > p {
        font-size: var(--font-body);
    }

    .field label,
    .fieldset legend,
    .field-label {
        font-size: var(--font-field-title);
    }

    /* モーダル全体 */
    .modal {
        padding: 10px;
        align-items: flex-start;
    }

    .modal-content {
        width: 100%;
        max-height: calc(100vh - 20px);
        margin-top: 10px;
        border-radius: 10px;
    }

    /* モーダル上部 */
    .modal-header {
        position: sticky;
        top: 0;
        z-index: 10;
        padding: 14px 16px;
        background: #fff;
    }

    .modal-header h2 {
        padding-right: 8px;
        font-size: 1.15rem;
        line-height: 1.5;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        font-size: 30px;
    }

    /* モーダル本文 */
    .modal-body {
        max-height: calc(100vh - 90px);
        padding: 16px 14px 30px;
        font-size: 16px;
        line-height: 1.8;
        -webkit-overflow-scrolling: touch;
    }

    /* 規約全体 */
    .policy {
        font-size: 16px;
        line-height: 1.8;
    }

    /* 各項目のカード */
    .policy-section {
        margin-bottom: 20px;
        padding: 16px 14px;
        border-radius: 8px;
    }

    .policy-section:last-child {
        margin-bottom: 0;
    }

    /* 見出し */
    .policy-section h2 {
        margin-bottom: 14px;
        padding-bottom: 9px;
        font-size: 18px;
        line-height: 1.55;
    }

    /* 本文 */
    .policy-section p {
        margin: 0 0 14px;
    }

    /* 箇条書き */
    .policy ul {
        margin: 0;
        padding-left: 1.3em;
    }

    .policy li {
        margin-bottom: 10px;
        padding-left: 2px;
    }

    /* 強調案内 */
    .policy-note {
        margin-top: 14px;
        padding: 13px 14px;
        border-left-width: 4px;
        font-size: 15px;
        line-height: 1.75;
    }

    /* 電話・問い合わせ欄 */
    .policy-contact {
        margin-top: 14px;
        padding: 15px 14px;
        font-size: 15px;
        line-height: 1.8;
    }

    .policy-contact strong {
        display: block;
        margin-bottom: 4px;
        font-size: 16px;
    }

    .policy-contact small {
        display: block;
        margin-top: 6px;
        font-size: 13px;
        line-height: 1.6;
    }

    /* 電話番号を押しやすくする場合 */
    .policy-contact a[href^="tel:"] {
        display: inline-block;
        margin: 5px 0;
        color: #A40B5D;
        font-size: 19px;
        font-weight: bold;
        text-decoration: none;
        letter-spacing: 0.03em;
    }
}

/* ========================================
   固定値・補足文
======================================== */
.fixed-value {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
}

.field-note {
    margin: 6px 0 0;
    color: var(--muted-color);
    font-size: var(--font-note);
    line-height: 1.7;
}

/* ラジオボタン・チェックボックス本文 */
.choice,
.agreement-label {
    font-size: var(--font-body);
}

@media (max-width: 760px) {
    .fixed-value {
        font-size: 1.05rem;
    }
}

/* ========================================
   申込画面の文字サイズをすべて統一
   「氏名」ラベルと同じ 1rem
======================================== */
#sub-header h2.h1,
#apply-form,
#apply-form h1,
#apply-form h2,
#apply-form h3,
#apply-form p,
#apply-form label,
#apply-form legend,
#apply-form .field-label,
#apply-form .section-note,
#apply-form .fixed-value,
#apply-form .field-note,
#apply-form .required,
#apply-form .error,
#apply-form .error-summary,
#apply-form .error-summary strong,
#apply-form .error-summary p,
#apply-form .agreement-label,
#apply-form .credit-notice,
#apply-form .button,
#apply-form input,
#apply-form select,
#apply-form textarea,
#apply-form .confirm-list dt,
#apply-form .confirm-list dd,
#apply-form .completion-card h2,
#apply-form .completion-card p,
#apply-form a {
    font-size: 1.8rem !important;
}

/* 見出し階層は太さ・余白で区別 */
#sub-header h2.h1 {
    font-weight: 700;
    line-height: 1.5;
}

#apply-form .form-card h2,
#apply-form .completion-card h2 {
    font-weight: 700;
}

#apply-form .field label,
#apply-form .fieldset legend,
#apply-form .field-label,
#apply-form .confirm-list dt {
    font-weight: 600;
}

#apply-form .section-note,
#apply-form .field-note,
#apply-form .required-note,
#apply-form .completion-card p {
    font-weight: 400;
}

/* 必須ラベルも同サイズのため、余白を微調整 */
#apply-form .required {
    padding: 1px 6px;
    line-height: 1.35;
}

/* スマートフォンでも同じサイズを維持 */
@media (max-width: 760px) {
    #sub-header h2.h1,
    #apply-form,
    #apply-form h1,
    #apply-form h2,
    #apply-form h3,
    #apply-form p,
    #apply-form label,
    #apply-form legend,
    #apply-form .field-label,
    #apply-form .section-note,
    #apply-form .fixed-value,
    #apply-form .field-note,
    #apply-form .required,
    #apply-form .error,
    #apply-form .agreement-label,
    #apply-form .credit-notice,
    #apply-form .button,
    #apply-form input,
    #apply-form select,
    #apply-form textarea,
    #apply-form .confirm-list dt,
    #apply-form .confirm-list dd,
    #apply-form a {
        font-size: 1.7rem !important;
    }
}

/* ========================================
   h2見出しのみ少し大きく表示
======================================== */
/* h2だけ大きくする */
#apply-form .form-card h2,
#apply-form .completion-card h2 {
    font-size: 2.3rem !important;
    font-weight: 700;
    line-height: 1.45;
}

@media (max-width: 760px) {
    #apply-form .form-card h2,
    #apply-form .completion-card h2 {
        font-size: 2.1rem !important;
    }
}
