/* --- 全体設定：左右余白を均等に --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
    overflow-x: hidden; width: 100vw; background-color: #f0f2f5;
}

/* 連絡ボックスのコンテナ（左右均等） */
.log-container { 
    padding: 20px 0 120px 0; /* 上下余白 */
    width: 94%; /* 画面の94%を使用 */
    margin: 0 auto; /* 左右中央寄せ */
}

.body-background-ship {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                url('../images/maya.jpg') no-repeat center center fixed !important;
    background-size: cover !important;
}

/* ヘッダー */
header { background: rgba(26, 60, 109, 0.95); color: white; padding: 15px; position: sticky; top: 0; z-index: 100; }
.header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.btn-go-send { background: #ffc107; color: #000; text-decoration: none; padding: 8px 20px; border-radius: 25px; font-weight: bold; }

/* ボタン類（壊れていたセレクターを修正） */
.status-selector, .role-selector, .input-selector { display: flex; gap: 6px; margin-bottom: 10px; }
.status-btn, .role-btn, .input-selector label { flex: 1; position: relative; }
.status-btn input, .role-btn input, .input-selector input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; z-index: 10; }

.status-label, .role-label, .selector-label {
    display: block; padding: 12px 2px; text-align: center; border-radius: 12px;
    font-weight: bold; font-size: 0.85rem; background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8);
    border: 2px solid transparent;
}
/* 入力画面用のボタングレー背景 */
.selector-label { background: #f0f2f5; color: #666; }

/* 選択時の色設定 */
input:checked + .status-label, input:checked + .role-label, input:checked + .selector-label { color: white !important; border-color: white !important; }
input[value="乗船中"]:checked + .status-label { background: #007bff; }
input[value="下船中"]:checked + .status-label { background: #6c757d; }
input[value="全員"]:checked + .role-label, input[value="全員"]:checked + .selector-label { background: #e63946; }
input[value="甲板"]:checked + .role-label, input[value="甲板"]:checked + .selector-label { background: #2ecc71; }
input[value="機関"]:checked + .role-label, input[value="機関"]:checked + .selector-label { background: #7f8c8d; }
input[value="全部"]:checked + .role-label, input[name="title"]:checked + .selector-label { background: #1a3c6d; }

/* 履歴カード */
.log-item { 
    background: rgba(255, 255, 255, 0.98); 
    margin-bottom: 15px; 
    padding: 18px 15px; 
    border-radius: 20px; 
    border-left: 10px solid #ccc; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    width: 100%; /* 親の94%の中でいっぱいに広がる */
}
.item-全員 { border-left-color: #e63946; }
.item-甲板 { border-left-color: #2ecc71; }
.item-機関 { border-left-color: #7f8c8d; }

/* 最新投稿の特別な隙間 */
.latest-item { margin-bottom: 45px !important; border-left-width: 15px; transform: scale(1.01); }

/* 【修正】日本語のオシャレ「最新」タグ（上にはみ出し） */
.new-label { 
    position: absolute; top: -14px; left: 10px;
    background: #ffc107; color: black; padding: 4px 18px; 
    border-radius: 8px; font-size: 0.95rem; font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4); z-index: 5;
}

/* 題名ラベル（短縮版） */
.log-title { display: inline-block; font-weight: bold; font-size: 0.85rem; padding: 3px 12px; border-radius: 20px; margin-bottom: 10px; }
.title-gyomu { background: #e63946; color: white; }
.title-yotei { background: #ffc107; color: black; }

/* 右下ゴミ箱 */
.btn-delete { 
    position: absolute; bottom: 12px; right: 12px;
    background: none; border: none; font-size: 1.2rem; cursor: pointer; opacity: 0.3;
}

/* 爆破拡大 */
.log-body { transition: all 0.3s ease; }
.scale-lv3.latest-item .log-body, .scale-lv3.latest-item .log-body * { font-size: 2.3rem !important; font-weight: bold !important; line-height: 1.2 !important; }
.scale-lv5.latest-item .log-body, .scale-lv5.latest-item .log-body * { font-size: 5rem !important; font-weight: 900 !important; line-height: 1.1 !important; }

/* 読み込むボタン */
.btn-more {
    display: block; width: 100%; padding: 18px; background: rgba(255,255,255,0.9);
    border: none; border-radius: 15px; font-weight: bold; color: #1a3c6d; font-size: 1rem;
}

/* 強調マーカー */
.text-highlight { background-color: #ffff00 !important; color: #e63946 !important; font-weight: bold !important; border-radius: 4px; padding: 0 4px; }

/* フッター */
.zoom-footer { position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(0,0,0,0.85); padding: 12px; z-index: 200; border-top: 1px solid #444; }
.zoom-buttons { display: flex; justify-content: center; align-items: center; gap: 30px; }
.btn-zoom { background: white; color: black; border: none; padding: 10px 25px; border-radius: 10px; font-weight: bold; font-size: 1rem; }
.zoom-level { color: #ffc107; font-weight: bold; font-size: 1.2rem; min-width: 50px; text-align: center; }