/* --- puzzle.css 全面改訂版 --- */

#puzzle-container {
    display: grid;
    gap: 2px;
    margin: 20px auto;
    border: 3px solid #ffd700; /* 黄金の縁取り */
    background-color: rgba(0,0,0,0.5);
    width: 306px;  /* (100px * 3) + gap */
    height: 306px;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    box-shadow: 0 0 20px rgba(255, 214, 0, 0.3);
}

.puzzle-piece {
    width: 100px;
    height: 100px;
    cursor: pointer;
    background-size: 300px 300px; /* 3x3の全体サイズ */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    transition: transform 0.1s;
}

/* 空白のピース（スライド用） */
.puzzle-piece.empty {
    background: transparent !important;
    cursor: default;
    border: none;
}

/* 操作ボタン周り */
.controls {
    text-align: center;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #d3381c;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    margin: 5px;
    box-shadow: 0 4px 0 #8b1e0a;
}

.btn:active {
    transform: translateY(2px);
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid #555;
    color: #ccc;
    box-shadow: none;
}
