/* ============================================================
   共通スタイル（全画面共通）
   ============================================================ */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    margin: 0; padding: 0; background-color: #f4f7f6; color: #333; line-height: 1.6;
}

div.header { text-align: center; margin-top: 20px; }
div.header img { height: 50px; }
div.header h1 { font-size: 1.4rem; margin: 10px 0; color: #2e7d32; }

/* 全体幅を 650px に維持 */
#logForm, #inspectionForm, .menu-wrapper { 
    width: 95%; 
    max-width: 650px; 
    margin: 0 auto 30px auto; 
}

table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
td.label { width: 30%; padding: 12px 10px; background: #f8f9fa; border: 1px solid #dee2e6; font-size: 0.8rem; font-weight: bold; line-height: 1.4; }
td.input { width: 70%; padding: 10px; border: 1px solid #dee2e6; }

/* 入力欄の基本スタイル（iPhone対策を追加） */
input, select, textarea { 
    width: 100%; height: 46px; box-sizing: border-box; border: 1px solid #ced4da; 
    border-radius: 4px; font-size: 16px; padding: 10px; background-color: #fff;
    -webkit-appearance: none; appearance: none;
}

/* 3:3 黄金比レイアウト用 */
.flex-input-row { display: flex; align-items: stretch; width: 100%; gap: 6px; }
.w-3-3 { flex: 3 !important; min-width: 0; }
.unit-label { display: flex; align-items: center; white-space: nowrap; font-size: 0.85rem; color: #666; }

/* ============================================================
   統一ボタンシステム（btn-fwクラス）
   ============================================================ */
.button-container { display: flex; flex-direction: column; gap: 15px; }
.menu-item-group { display: flex; flex-direction: column; gap: 4px; width: 100%; }

.btn-fw {
    width: 100%;
    height: 80px !important; 
    border: none !important; 
    border-radius: 10px !important;
    color: #ffffff !important; 
    font-weight: bold !important; 
    font-size: 1.1rem !important;
    cursor: pointer; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    justify-content: center; 
    line-height: 1.2;
    box-shadow: 0 4px #999;
    text-decoration: none;
}

/* ★履歴ボタン（高さを 42px に低く設定） */
.btn-sub {
    width: 100%;
    height: 42px !important;
    border-radius: 6px !important;
    background-color: #f8f9fa !important;
    color: #333 !important;
    border: 1px solid #ccc !important;
    font-size: 0.9rem !important;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px #ccc;
}

.btn-fw span { font-size: 0.8rem; font-weight: normal; margin-top: 2px; }
.btn-fw:active, .btn-sub:active { transform: translateY(3px); box-shadow: 0 1px #666; }

.fw-orange { background-color: #ff6d00 !important; }
.fw-green  { background-color: #2e7d32 !important; }
.fw-blue   { background-color: #1e88e5 !important; }