/* リセットと基本設定 */
* { box-sizing: border-box; }
body, html { 
    margin: 0; padding: 0; height: 100%; 
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif; 
    color: #333;
}

/* 背景画像の設定 (SPAのベース) */
.bg-layer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('assets/background.jpg') no-repeat center center;
    background-size: cover;
    z-index: -1;
}

/* メインコンテナ（半透明で浮き上がらせる） */
.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    opacity: 0; /* JSでフェードインさせるための初期値 */
    transition: opacity 0.5s ease-in-out;
}

header h1 { 
    text-align: center; 
    font-size: 1.5rem;
    border-bottom: 2px solid #2c3e50; 
    padding-bottom: 15px; 
    margin-top: 0;
}

/* セキュリティ注意書きのスタイリング（商用レベルの信頼感） */
.security-info {
    background: #f8fbff;
    border-left: 5px solid #0056b3;
    padding: 20px;
    margin-bottom: 30px;
    font-size: 0.9rem;
    line-height: 1.6;
}
.security-info h2 { font-size: 1.05rem; margin-top: 0; color: #0056b3; }
.security-info p { margin-bottom: 10px; font-weight: bold; }
.security-info ul { margin: 0; padding-left: 20px; color: #555; }
.security-info li { margin-bottom: 5px; }

/* iframeのレスポンシブ対応 */
.iframe-wrapper { 
    position: relative; 
    width: 100%; 
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
#formzu-iframe { 
    width: 100%; 
    height: 1050px; 
    border: none; 
    display: block;
    overflow-y: auto; 
}

.state-complete #formzu-iframe {
    height: 300px; 
}

footer { text-align: center; margin-top: 30px; font-size: 0.8rem; color: #777; }

/* モバイル向け（レスポンシブ） */
@media (max-width: 768px) {
    .container { margin: 15px; padding: 15px; border-radius: 8px; }
    header h1 { font-size: 1.3rem; }
    .security-info { padding: 15px; font-size: 0.85rem; }
    #formzu-iframe { height: 1050px; } 
}

/* iframe内で読み込まれた場合に、親サイトのUIを非表示にする（二重表示防止） */
.is-framed header,
.is-framed .security-info,
.is-framed footer {
    display: none !important;
}

.is-framed .container {
    margin: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
    max-width: 100%;
}

/* 完了メッセージのスタイリング */
.complete-message {
    text-align: center;
    padding: 40px 20px; 
    min-height: auto;   
}
.complete-message h2 {
    color: #0056b3;
    margin-bottom: 20px;
}
.complete-message p {
    font-size: 1.1rem;
    line-height: 1.8;
}
/* 完了状態（state-completeクラスがある時）のレイアウト微調整 */
.state-complete .container {
    margin-top: 10vh; /* 画面中央寄りに配置 */
    padding-bottom: 40px;
}