body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #DDDDDD;
}

.message-box {
    background-color: white;
    border: 1px solid #a9a9a9;
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 20px;
}

.message-input {
    width: 100%;
    min-height: 105px;
    border: none;
    resize: none;
    font-size: 16px;
    outline: none;
    background: transparent;
    text-align: left; /* 左詰め */
}

.message-input.typing-cursor::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.title {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    background-color: #778899;
    color: white;
    padding: 5px;
    border-radius: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: white;
    border: 1px solid #a9a9a9;
}

th, td {
    border: 1px solid #ddd;
    text-align: center;
    vertical-align: middle;
    padding: 0; /* セルの余白をなくす */
    font-weight: bold;
    font-size: 18px;
    width: 12.5%; /* 8等分にするためにセルの幅を12.5%に設定 */
    height: 60px; /* セルの高さを統一 */
}

th {
    background-color: #E7B975;
    color: black;
    font-size: 18px; /* 入力セルと同じサイズに */
}

/* 最左列のQ列スタイル */
tr th:first-child {
    background-color: #E7B975;
    color: black;
}

input[type="text"] {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    vertical-align: middle;
    font-size: 18px;
    font-weight: bold;
    background: white;
    outline: none;
    padding: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.special-cell {
    background-color: #F1DFBF;
    font-size: 18px;
    font-weight: bold;
    vertical-align: middle;
}

.confirm-button {
    width: 80%;
    height: 60%;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

.confirm-button:hover {
    background-color: #91ccac;
}

.certificate-button {
    display: none;
    background-color: #FFD700;
    color: #333;
    border: 2px solid #FFA500;
    padding: 12px 24px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    margin: 20px auto;
    display: block;
    animation: pulse 2s infinite;
}

.certificate-button:hover {
    background-color: #FFA500;
    color: white;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.save-buttons {
    margin-top: 15px;
    text-align: center;
}

.save-buttons button {
    margin: 3px;
    padding: 4px 8px;
    font-size: 16px;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.save-buttons button:hover {
    background-color: #e9e9e9;
}

.save-status {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

/* 画像表示用の2×2表のスタイル */
.image-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #000000;
    border: 1px solid #a9a9a9;
}

th.image-title-header {
    background-color: #778899 !important; /* ← 強制的に上書き */
    color: white !important;
    height: 20px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    padding: 5px;
    border: 1px solid #a9a9a9;
}

.image-cell {
    border: 1px solid #a9a9a9;
    width: 50%;
    height: 40vw;
    text-align: center;
    vertical-align: middle;
    position: relative;
    background-color: #000000;
}

.image-cell.locked {
    background-color: #000000;
    color: #808080;
    font-size: 48px;
    font-weight: bold;
}

.image-cell.unlocked {
    background-color: #000000;
    padding: 5px;
}

.achievement-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 5px;
}