/* 全体のスタイル */
body {
    font-family: 'Arial', sans-serif;
    max-width: 1000px;
    margin: auto;
    padding: 20px;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.header {
    font-size: 1.8em;
    font-weight: bold;
    color: #004085;
    margin-bottom: 30px;
    padding: 10px 0;
    text-align: left;
    border-bottom: 3px solid #004085;
}

/* セクション見出し */
.section-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #004085;
    padding: 12px 15px;
    background-color: #e9f2fb;
    border-left: 6px solid #004085;
    margin: 20px 0 15px;
}

.stamp-section {
display: flex;
gap: 15px;
justify-content: space-between;
align-items: center; /* 全体の高さを揃える */
}

.stamp-box {
width: 80px; /* コンパクトな幅 */
padding: 5px;
border: 2px solid #ddd;
border-radius: 8px;
background-color: #f9fafb;
text-align: center;
position: relative; /* 中央配置の基準に */
height: 80px; /* 高さを揃える */
display: flex;
align-items: center;
justify-content: center;
}

.stamp-frame {
width: 45px;
height: 45px;
border: 2px solid red;
border-radius: 50%; /* 正円にする */
position: absolute; /* 中央に配置するため */
top: 50%;
left: 50%;
transform: translate(-50%, -50%); /* 中央に配置 */
display: none; /* 初期状態では非表示 */
align-items: center;
justify-content: center;
font-weight: bold;
color: red;
font-size: 0.8em;
font-family: "serif";
box-sizing: border-box;
}

.stamp-button {
font-size: 0.8em;
padding: 5px 10px;
color: #ffffff;
background-color: #004085;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s;
position: relative;
z-index: 1;
}

.stamp-item {
display: flex;
align-items: center; /* ラベルとスタンプボックスを横並びに */
}

.stamp-label {
margin-right: 8px; /* ラベルと枠の間のスペース */
}

.stamp-button.hidden {
visibility: hidden; /* ボタンをクリック後、非表示にする */
}

.stamp-box label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}
.stamp-button.hidden {
    visibility: hidden;
}

/* テーブルのスタイル */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
th, td {
    padding: 14px;
    vertical-align: middle;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 1em;
    color: #333;
}
th {
    background-color: #f4f8fc;
    font-weight: bold;
}
td {
    background-color: #ffffff;
}
tr:last-child td {
    border-bottom: none;
}

/* 入力フィールドスタイル */
input[type="text"], textarea {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    box-sizing: border-box;
    resize: none;
}
input[type="text"]:not(.editable), textarea:not(.editable) {
    border: none;
    background-color: #f5f5f5;
    color: #333;
    height: auto;
}
.editable {
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9fafb;
    transition: all 0.2s;
    height: auto;
}
.editable:focus {
    border-color: #004085;
    background-color: #e6f0ff;
    outline: none;
    box-shadow: 0 0 4px rgba(0, 64, 133, 0.3);
}

/* ボタンスタイル */
.button-container {
    text-align: center;
    margin-top: 30px;
}
.button {
    font-size: 1em;
    padding: 10px 20px;
    margin: 5px;
    color: #ffffff;
    background-color: #004085;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.button:hover {
    background-color: #003366;
}
.button.secondary {
    background-color: #6c757d;
    padding-top: 12px;
    padding-bottom: 14px;
    text-decoration:none;
}
.button.secondary:hover {
    background-color: #5a6268;
}

.button.delete {
    background-color: #FF0000;
    padding-top: 12px;
    padding-bottom: 14px;
    text-decoration:none;
}
.button.delete:hover {
    background-color: #800000;
}

/* モバイル対応 */
@media (max-width: 600px) {
    body {
        padding: 15px;
    }
    .section-title {
        font-size: 1.1em;
        padding: 10px;
    }
    th, td {
        padding: 10px;
        font-size: 0.9em;
    }
    .stamp-section {
        flex-direction: column;
        align-items: flex-start;
    }
    .stamp-item {
        width: 100%;
        margin-bottom: 10px;
    }
}
.s3-image {
    width: 100%; /* 横幅を親要素に合わせる */
    max-width: 100%; /* 横幅の上限も親要素に固定 */
    height: auto; /* アスペクト比を維持 */
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}