* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
}

/* ===== ゲームエリア ===== */
#game-area {
    background: #f5ede0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* ===== ○と× ===== */
.mark {
    font-size: 1.2em;
}

#mode-select {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.mode-btn {
    padding: 10px 24px;
    border: 2px solid #6b3f1f;
    background: transparent;
    color: #6b3f1f;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.mode-btn.active {
    background: #6b3f1f;
    color: #fff;
}

#difficulty-select {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

#difficulty-select.hidden {
    display: none;
}

.diff-btn {
    padding: 6px 18px;
    border: 2px solid #6b3f1f;
    background: transparent;
    color: #6b3f1f;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.diff-btn.active {
    background: #6b3f1f;
    color: #fff;
}

#score-board {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 1rem;
}

.score-item {
    text-align: center;
    background: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    min-width: 100px;
    color: #3d1f00;
    border: 2px solid #c8a882;
    white-space: nowrap;
}

.score-item > span {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #e63946;
}

#status {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 12px;
    min-height: 1.6em;
    color: #3d1f00;
}

canvas {
    border-radius: 12px;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

#reset-btn {
    margin-top: 16px;
    padding: 10px 32px;
    background: #6b3f1f;
    border: none;
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

#reset-btn:hover {
    background: #4a2a0f;
}
