/* ==========================================
   1. 画面全体のリセット（位置ズレの根本解消）
   ========================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
    background: #eef6ff;
    color: #18324f;
    display: flex;
    flex-direction: column; /* ヘッダーを上、中身を下へ正しく並べる */
    align-items: center;
    box-sizing: border-box;
}

/* ==========================================
   2. ヘッダー iframe の完全横幅リセット
   ========================================== */
iframe[src="header.html"] {
    width: 100% !important;
    max-width: 100% !important;
    height: 70px !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 100;
}

/* ==========================================
   3. メイン白ボックス（中央配置・ごちゃつき解消）
   ========================================== */
.container {
    width: 90%;
    max-width: 600px;
    margin: 40px auto; /* 上下に適度な余白 */
    padding: 35px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

/* タイトル */
h2 {
    margin: 0 0 24px 0;
    color: #1a2a3a;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid #d7e8f8;
    padding-bottom: 15px;
}

/* ==========================================
   4. フォーム要素の統一デザイン
   ========================================== */
.form-group {
    margin-bottom: 20px;
    text-align: left; /* 文字を左寄せに固定 */
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #315878;
    font-size: 14px;
}

/* 入力枠のサイズと余白を完全に揃える */
input[type="text"],
input[type="number"],
select,
textarea {
    width: 100% !important;
    padding: 12px 14px !important;
    border: 1px solid #b8d2ea !important;
    border-radius: 8px !important;
    background-color: #f7fbff !important;
    font-size: 15px !important;
    color: #18324f !important;
    transition: all 0.2s ease;
    box-sizing: border-box !important;
}

/* 入力中（フォーカス時）のエフェクト */
input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: #2878c8 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(40, 120, 200, 0.18) !important;
}

/* ==========================================
   5. ボタン・パーツデザイン
   ========================================== */
button {
    width: 100% !important;
    padding: 14px !important;
    background: #1f5fae !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    box-sizing: border-box !important;
    margin-top: 10px;
}

button:hover {
    background: #174b8a !important;
}

/* 閲覧画面（view.html）用のカード共通デザイン */
.sort-box {
    display: flex;
    align-items: center;
    background: #edf2f7;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    gap: 10px;
}

.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    text-align: left;
}