/* 基本設定 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    margin: 0;
    padding: 20px;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: #fff;
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 800px;
}

/* ヘッダー */
.site-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.site-header img {
    max-width: 300px;
    width: 80%;
    height: auto;
}

/* 見出し */
h2, h3 {
    color: #333;
}
h2 {
    margin-top: 30px;
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
    font-size: 1.4em;
}
h3 {
    margin-top: 25px;
    font-size: 1.1em;
    color: #555;
}
.result-title {
    margin-bottom: 10px;
}

/* セクション設定 */
.section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ccc;
}
.section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* フォーム要素 */
.main-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box; /* paddingを含めてwidthを100%にする */
    margin-bottom: 20px;
    background-color: #fdfdfd;
}

textarea {
    min-height: 150px;
    resize: vertical; /* 縦方向のみリサイズ可能に */
    line-height: 1.6;
}

#summary_text {
    min-height: 200px;
    background-color: #f9f9f9;
    white-space: pre-wrap; 
    word-wrap: break-word;
}

/* 実行ボタン */
.submit_button {
    display: block; /* ボタンをブロック要素にして幅いっぱいにする */
    width: 100%;
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
}

.submit_button:hover {
    background-color: #0056b3;
}

/* 広告セクション */
.ad-section {
    text-align: center;
    padding-top: 20px;
}

/* 注意書きボックス */
.notes {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-left: 5px solid #ffc107;
    padding: 15px 20px;
    margin: 25px 0;
    border-radius: 4px;
    font-size: 0.9em;
}
.notes p { margin: 0; }
.notes p strong {
    color: #333;
    display: block;
    margin-bottom: 8px;
}
.notes ul {
    margin: 0;
    padding-left: 20px;
}
.notes li { color: #555; }
.notes a { color: #0056b3; }

/* アプリストアバッジ */
.app-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap; /* スマホ表示で折り返す */
    margin-top: 15px;
}
.app-badges img {
    width: 180px;
    height: auto;
}

/* サイトマップテーブル */
.tbl-r02 {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9em;
}
.tbl-r02 th, .tbl-r02 td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: middle;
}
.tbl-r02 th {
    background-color: #f7f7f7;
    width: 120px;
    font-weight: bold;
}
.tbl-r02 td a {
    color: #007bff;
    text-decoration: none;
}
.tbl-r02 td a:hover {
    text-decoration: underline;
}

/* ローディング画面のスタイル（元々あるもの） */
#loading {
    display: none; /* 初期状態は非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
}
.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -30px;
    margin-left: -30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* レスポンシブ対応 */
@media screen and (max-width: 600px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 15px 20px;
    }
    h2 {
        font-size: 1.2em;
    }
    .tbl-r02 th {
        width: 80px;
    }
    .tbl-r02 th, .tbl-r02 td {
        padding: 8px;
    }
}


/* 実行ボタンのホバー効果を、非活性ではない(:not(:disabled))時のみ適用するように変更 */
.submit_button:not(:disabled):hover {
    background-color: #0056b3;
}

/* 実行ボタンが非活性(:disabled)の時のスタイルを追記 */
.submit_button:disabled {
    background-color: #cccccc; /* 背景をグレーアウト */
    color: #666666;           /* 文字色を薄く */
    cursor: not-allowed;    /* カーソルを禁止マークに */
}