.sa-game-wrapper {
    background-color: #ffffff;
    color: #333333;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    padding: 20px 10px;
    box-sizing: border-box;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.sa-game-wrapper h1 {
    color: #007da0;
    font-size: 2rem;
    margin-top: 10px;
    margin-bottom: 10px;
}

.sa-status-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.sa-status-box {
    font-size: 1.1rem;
    background: #f0f0f0;
    color: #333333;
    padding: 8px 15px;
    border-radius: 8px;
    flex: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#sa-score, #sa-timer {
    color: #d35400;
    font-weight: bold;
}

.sa-game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
}

.sa-card {
    aspect-ratio: 1 / 1;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.4s;
    width: 100%;
}

.sa-card.flipped {
    transform: rotateY(180deg);
}

.sa-card.matched {
    visibility: hidden;
    pointer-events: none;
}

.sa-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    overflow: hidden;
}

.sa-card-front {
    background-color: #0055a5;
    background-image: url('img/sa_front.png'); /* 横並び構成のパスに修正 */
    background-size: cover;
    background-position: center;
}

.sa-card-back {
    background-color: #fff;
    transform: rotateY(180deg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.sa-card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#sa-restart-btn {
    background-color: #00d2ff;
    color: #1a1a1a;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#sa-restart-btn:hover {
    background-color: #009ec2;
}

@media (max-width: 480px) {
    .sa-game-wrapper h1 { font-size: 1.6rem; }
    .sa-status-box { font-size: 0.95rem; padding: 6px 10px; }
    .sa-game-board { gap: 6px; }
}