/* --- 1. ベース設定（背景を強制的に漆黒へ） --- */
body.contact-page {
    background-color: #000 !important;
    color: #fff !important;
    margin: 0;
    padding: 0;
}

/* 背景の星空などを一番後ろに */
.cosmic-bg, #orb-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -1;
    pointer-events: none;
    /* object-fit は不要なので消してスッキリさせましょう */
}

/* --- 2. レイアウト設定（上部余白を調整） --- */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    /* ★160pxから60pxへ：これで1画面に収まりやすくなる */
    padding: 60px 20px 60px; 
    opacity: 0;
}

.contact-container.reveal {
    animation: contactFadeUp 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes contactFadeUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

.form-header {
    text-align: center;
    margin-bottom: 30px; /* 少し詰めました */
}

.subtitle {
    color: #e6b422;
    letter-spacing: 0.3em;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* --- 3. フォーム本体 --- */
.ritual-form {
    display: flex;
    flex-direction: column;
    gap: 20px; /* ★30pxから20pxへ：全体の高さを抑える */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(230, 180, 34, 0.2);
    padding: 40px; /* 50pxから40pxへ：少しタイトに */
    backdrop-filter: blur(15px);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group label {
    color: #e6b422;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
}

/* 入力欄のデザイン */
.input-group input, 
.input-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-bottom: 1px solid rgba(230, 180, 34, 0.3);
    color: #fff;
    padding: 10px; /* 少しスリムに */
    font-size: 1rem;
    transition: all 0.5s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-bottom: 1px solid #e6b422;
    background: rgba(230, 180, 34, 0.08);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ★NATTIこだわり：最寄り駅の「外出し文字」用 --- */
.station-layout {
    display: flex;
    gap: 15px;
}
.input-unit {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.unit-text {
    color: #e6b422;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* 姓名などの横並び */
.name-inputs {
    display: flex;
    gap: 15px;
}
.name-inputs input {
    flex: 1;
}

/* --- 4. チェックボックス --- */
.check-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 5px;
}
.custom-check {
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ccc;
    transition: color 0.3s;
}
.custom-check:hover {
    color: #e6b422;
}

/* --- 5. 送信ボタン --- */
.submit-btn {
    margin-top: 10px;
    padding: 18px;
    background: transparent;
    border: 1px solid #e6b422;
    color: #e6b422;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 0.8em;
    text-indent: 0.8em;
    cursor: pointer;
    position: relative;
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.submit-btn:hover {
    background: #e6b422;
    color: #000;
    box-shadow: 0 0 30px rgba(230, 180, 34, 0.6);
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(1px);
}

@media screen and (max-width: 768px) {
    /* 1. タイトル周りの間隔を詰める */
    .contact-title-group, .ototsure-logo-area { /* オトツレのクラス名 */
        margin-bottom: 5px !important;
        padding-bottom: 0 !important;
    }
    
    h2.contact-title { /* お問合わせのタイトル */
        margin-top: 0 !important;
        padding-top: 0 !important;
        font-size: 24px !important;
    }

    /* 2. 氏名と最寄り駅を「縦並び」に強制変更 */
    .form-row, .flex-row { /* 横並びにしている親要素 */
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 20px !important; /* 項目間の余白 */
        box-sizing: border-box !important;
    }

    /* 3. お問合わせ内容の箱を大きく */
    textarea {
        min-height: 250px !important; /* しっかりと高さを確保 */
    }

    /* 4. 共鳴の対象（チェックボックス）の整列 */
    .checkbox-container, .resonance-group { 
        display: flex !important;
        flex-direction: column !important; /* 1行ずつ縦に並べる */
        align-items: flex-start !important;
        gap: 12px !important;
        margin-top: 10px !important;
    }

    .checkbox-item { /* チェックボックスとラベルのセット */
        display: flex !important;
        align-items: center !important; /* 文字と箱の「芯」を揃える */
        width: 100%;
    }

    input[type="checkbox"] {
        width: 22px !important;
        height: 22px !important;
        margin: 0 12px 0 0 !important; /* 右側にだけ余白 */
        flex-shrink: 0 !important;
    }

    /* 5. 送信ボタンを完璧に上下左右中央揃え */
    .submit-btn {
        display: flex !important;
        align-items: center !important;    /* 上下中央 */
        justify-content: center !important; /* 左右中央 */
        width: 100% !important;
        height: 60px !important;
        padding: 0 !important; /* paddingによるズレを防止 */
        font-size: 18px !important;
        line-height: 1 !important; /* テキストの行間をリセット */
        text-align: center !important;
    }
}