/******************************************************
 * TOUCH THE KANA
 ******************************************************/

.touchTheKanaPage {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

.touchTheKanaMain,
.touchTheKanaControls,
.touchTheKanaMessages {
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
}

.touchTheKanaMain h2 {
    margin-top: 0;
    margin-bottom: 16px;
    text-align: center;
}

.touchTheKanaStatus {
    min-height: 32px;
    margin-bottom: 16px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.touchTheKanaGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 520px;
    margin: 0 auto;
}

.touchTheKanaCell {
    aspect-ratio: 1 / 1;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #f8f8f8;
    font-size: 2rem;
    font-weight: 600;
    cursor: pointer;
}

.touchTheKanaCell:hover {
    background: #eee;
}

.touchTheKanaCell.isCorrect {
    opacity: 0.35;
    cursor: default;
}

.touchTheKanaCell.isWrong {
    outline: 2px solid #999;
}

.touchTheKanaControls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.touchTheKanaControlGroup {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.touchTheKanaControls button,
.touchTheKanaControls select {
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f8f8f8;
    font-size: 1rem;
    cursor: pointer;
}

.touchTheKanaControls button:hover,
.touchTheKanaControls select:hover {
    background: #eee;
}

.touchTheKanaControls label {
    font-weight: 600;
}

.touchTheKanaMessages {
    font-size: 0.95rem;
    line-height: 1.7;
}

.touchTheKanaInstruction,
.touchTheKanaNotice,
.voicevoxCredit {
    margin: 0 0 8px;
}

.voicevoxCredit {
    font-size: 0.85rem;
    color: #666;
}

.touchTheKanaMainButton {
    background-color: var(--main-color-1) !important;
    color: #fff;                 /* 文字色 */
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.touchTheKanaMainButton:hover {
    background-color: var(--main-color-3) !important;
}

.touchTheKanaMainButton:active {
    transform: translateY(1px);
}

/******************************************************
 * MOBILE
 ******************************************************/

@media (max-width: 600px) {
    .touchTheKanaPage {
        padding: 12px;
    }

    .touchTheKanaMain,
    .touchTheKanaControls,
    .touchTheKanaMessages {
        padding: 14px;
    }

    .touchTheKanaGrid {
        gap: 6px;
    }

    .touchTheKanaCell {
        font-size: 1.6rem;
        border-radius: 8px;
    }

    .touchTheKanaControls button,
    .touchTheKanaControls select {
        width: 100%;
    }
}




/******************************************************
 * Clear
 ******************************************************/

.touchTheKanaCell.isClear {
    animation: touchTheKanaClearButton 0.8s ease-in-out;
}

@keyframes touchTheKanaClearButton {

    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.2);
    }

    60% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

.touchTheKanaClearOverlay {

    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    pointer-events: none;
    z-index: 9999;
}

.touchTheKanaClearMessage {

    font-size: 48px;
    font-weight: bold;

    animation: touchTheKanaClearMessageAnimation 2s ease forwards;
}

@keyframes touchTheKanaClearMessageAnimation {

    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    20% {
        opacity: 1;
        transform: scale(1.2);
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}