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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f6fa;
    padding: 15px;
}

.container {
    max-width: 750px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.subtitle {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-bottom: 20px;
}

.matrix {
    display: flex;
    gap: 10px;
}

.y-axis {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 25px;
}

.y-axis .axis-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 11px;
    font-weight: bold;
    color: #555;
    margin-bottom: 10px;
}

.y-axis .axis-scale {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 240px;
    font-size: 10px;
    color: #888;
    text-align: right;
}

.grid-container {
    flex: 1;
}

.x-axis {
    display: flex;
    justify-content: space-around;
    font-size: 10px;
    color: #888;
    margin-bottom: 5px;
    padding-left: 0;
}

.x-label {
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    color: #555;
    margin-top: 8px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 80px);
    gap: 4px;
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cell {
    border-radius: 6px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cell-content {
    text-align: center;
}

.level-badge {
    display: inline-block;
    background: rgba(255,255,255,0.9);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 4px;
}

.cell strong {
    display: block;
    font-size: 11px;
    margin-bottom: 2px;
}

.cell p {
    font-size: 9px;
    color: rgba(0,0,0,0.7);
    line-height: 1.3;
}

.level-1 { background: #ecf0f1; }
.level-1 .level-badge { color: #7f8c8d; }

.level-2 { background: #d5f5e3; }
.level-2 .level-badge { color: #27ae60; }

.level-3 { background: #fdebd0; }
.level-3 .level-badge { color: #e67e22; }

.level-4 { background: #fadbd8; }
.level-4 .level-badge { color: #c0392b; }

.level-5 { background: #e8daef; }
.level-5 .level-badge { color: #8e44ad; }

.recommendations {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.rec-item {
    flex: 1;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.rec-header {
    padding: 8px;
    color: white;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
}

.level-1-bg { background: #27ae60; }
.level-3-bg { background: #e67e22; }
.level-5-bg { background: #8e44ad; }

.rec-body {
    padding: 10px;
    font-size: 10px;
    line-height: 1.4;
    color: #555;
}

@media (max-width: 600px) {
    .matrix {
        flex-direction: column;
    }

    .y-axis {
        flex-direction: row;
        width: 100%;
        margin-bottom: 10px;
    }

    .y-axis .axis-label {
        writing-mode: horizontal-tb;
        transform: none;
    }

    .y-axis .axis-scale {
        flex-direction: row;
        height: auto;
        width: 100%;
    }

    .grid {
        grid-template-rows: repeat(3, 70px);
    }

    .recommendations {
        flex-direction: column;
    }
}
