/* --- 全体設定：左右余白を完全に均等に --- */
* {
    box-sizing: border-box; /* ← これがズレ防止の魔法です */
    margin: 0;
    padding: 0;
}

body {
    font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
    overflow-x: hidden;
    width: 100%;
    background-color: #f0f2f5;
}

/* 連絡ボックスのコンテナ（左右均等） */
.log-container {
    padding: 20px 0 140px 0;
    width: 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 {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.status-label, .role-label, .selector-label {
    display: block;
    padding: 12px 2px;
    text-align: center;
    border-radius: 15px;
    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: 25px; /* 次の投稿との隙間を広めに */
    padding: 20px 15px;
    border-radius: 25px;
    border-left: 10px solid #ccc;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    width: 100%;
}

.item-全員 { border-left-color: #e63946; }
.item-甲板 { border-left-color: #2ecc71; }
.item-機関 { border-left-color: #7f8c8d; }

.latest-item {
    border-left-width: 15px;
    transform: scale(1.01);
}

/* 【最新タグ】右側へ移動・日本語・重なり演出 */
.new-label {
    position: absolute;
    top: -16px;
    right: 15px; /* 右側へ */
    background: #ffc107;
    color: black;
    padding: 6px 20px;
    border-radius: 12px;
    font-size: 1rem;
    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: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.title-gyomu { background: #fee2e2; color: #e63946; border: 1px solid #e63946; }
.title-yotei { background: #fffbeb; color: #d97706; border: 1px solid #ffc107; }

/* メタ情報 */
.log-meta {
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-target {
    padding: 4px 12px;
    border-radius: 10px;
    font-weight: bold;
    color: white;
    font-size: 0.75rem;
}

.badge-全員 { background: #e63946; }
.badge-甲板 { background: #2ecc71; }
.badge-機関 { background: #7f8c8d; }

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

/* もっと見るボタン */
.btn-more {
    display: block;
    width: 100%;
    padding: 20px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 20px;
    font-weight: bold;
    color: #1a3c6d;
    font-size: 1rem;
    margin-top: 10px;
}

/* 爆破拡大（ヌルッとスムーズ） */
.log-body { transition: all 0.3s ease; }
.scale-lv3.latest-item .log-body, .scale-lv3.latest-item .log-body * { font-size: 2.4rem !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; }

/* 強調マーカー */
.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: 12px;
    font-weight: bold;
    font-size: 1rem;
}

.zoom-level {
    color: #ffc107;
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 60px;
    text-align: center;
}