/* 全体設定 */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

/* 背景固定 */
.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/photo3.jpg') no-repeat center center / cover;
    z-index: -1;
}

.wrapper {
    text-align: center;
    padding: 50px 10px;
}

/* テーブル設定 */
.record-table {
    width: 100%;
    max-width: 950px; /* 少し幅を広げました */
    margin: 0 auto;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.9);
    table-layout: fixed;
}

/* 全てのセルを中央固定 */
.record-table th, 
.record-table td {
    border: 1px solid #999;
    padding: 15px 5px;
    text-align: center;
    vertical-align: middle;
    word-wrap: break-word;
}

.col-date { width: 110px; }
.col-content { width: auto; }
.col-photo { width: 140px; } /* 写真の列を少し広げました */

/* 写真を「1行独立」させて隙間を作る */
.photo-cell img {
    width: 100px;
    height: auto;
    display: block;      /* これで文字を下に落とす */
    margin: 0 auto 10px; /* 下に10pxの隙間を作る */
    border: 1px solid #ccc;
}

/* リンクを青いボタンにする */
.link {
    display: inline-block; /* これで幅と高さを認識させる */
    padding: 5px 15px;
    background-color: #007bff;
    color: white !important;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 右下TOPボタン */
.top-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.top-button a {
    text-align: center;
    text-decoration: none;
    color: #333;
    font-size: 0.75rem;
}

/* ========== レスポンシブ（タブレット以下） ========== */
@media (max-width: 768px) {
    .wrapper {
        padding: 24px 12px;
    }

    .record-table {
        max-width: 100%;
    }

    .record-table thead {
        display: none;
    }

    .record-table,
    .record-table tbody,
    .record-table tr,
    .record-table td {
        display: block;
    }

    .record-table tr {
        margin-bottom: 1em;
        padding: 12px;
        border: 1px solid #999;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.95);
    }

    .record-table td {
        border: none;
        padding: 8px 0;
        text-align: left;
    }

    .record-table td::before {
        display: block;
        font-weight: bold;
        margin-bottom: 4px;
        content: attr(data-label);
    }

    .record-table td.photo-cell {
        text-align: center;
    }

    .record-table td.photo-cell::before {
        text-align: left;
    }

    .photo-cell img {
        width: 180px;
        max-width: 100%;
        margin: 4px auto 8px;
    }

    .top-button {
        right: 12px;
        bottom: 12px;
        width: 48px;
        height: 48px;
        font-size: 0.7rem;
    }
}

/* ========== レスポンシブ（スマホ） ========== */
@media (max-width: 480px) {
    .wrapper {
        padding: 16px 8px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 0.9rem;
    }

    .record-table tr {
        padding: 10px;
    }

    .record-table td {
        font-size: 0.9rem;
    }

    .photo-cell img {
        width: 260px;
        max-width: 100%;
    }

    .link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .top-button {
        right: 10px;
        bottom: 10px;
        width: 44px;
        height: 44px;
    }

    .top-button a {
        font-size: 0.65rem;
    }
}