@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --color-blue: #0088FF;
    --color-green: #34C759;
    --color-orange: #FF8D28;
    --color-yellow: #FFCC00;
    --color-red: #FF383C;
    --color-gray: #8E8E93;
    --color-gray6: #F2F2F7;
    --color-white: #FFFFFF;
    --color-black: #1C1C1E;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-gray6);
    color: var(--color-black);
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    text-align: center;
    padding: 20px;
    background: var(--color-white);
    box-shadow: var(--shadow);
}

h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.score {
    margin-top: 8px;
    font-size: 20px;
    font-weight: 600;
}

.aiko-panel {
    text-align: center;
    margin: 10px 0;
    font-size: 14px;
}

.aiko-panel button {
    background: var(--color-green);
    color: #fff;
    font-size: 14px;
    padding: 8px 16px;
    margin-left: 10px;
    flex: none;
}

.history {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.buttons {
    background: var(--color-white);
    box-shadow: var(--shadow);
    padding: 15px;
}

.hand-buttons,
.result-buttons {
    display: flex;
    justify-content: space-around;
    margin: 10px 0;
    gap: 10px;
}

button {
    flex: 1;
    font-size: 18px;
    padding: 15px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hand-btn.gu {
    background: var(--color-blue);
}

.hand-btn.choki {
    background: var(--color-green);
}

.hand-btn.pa {
    background: var(--color-red);
}

.hand-btn.selected {
    outline: 3px solid var(--color-yellow);
    transform: scale(1.05);
}

.result-btn.win {
    background: var(--color-red);
}

.result-btn.lose {
    background: var(--color-blue);
}

.result-btn.draw {
    background: var(--color-gray);
}

/* メッセージ書式全般 */
.entry,
.setResult,
.declareAiko {
    background: var(--color-white);
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    font-size: 14px;
}

/* 役結果メッセージ */
.setResult {
    font-weight: 700;
    color: var(--color-red);
    text-align: right;
}

/* aiko宣言時メッセージ */
.declareAiko {
    font-weight: 700;
    color: var(--color-orange);
}

/* スマートフォン対応 */
@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 20px;
    }

    .score {
        font-size: 18px;
    }

    .buttons {
        padding: 10px;
    }

    .hand-btn {
        font-size: 24px;
    }

    .result-btn {
        font-size: 14px;
    }

    .hand-btn, .result-btn {
        padding: 10px;
        aspect-ratio: 1 / 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}