/* graph-styles.css */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 1rem;
    font-family: sans-serif;
    background: #fff;
    display: flex;
    justify-content: center;  /* 横方向センター */
    align-items: flex-start;  /* 縦方向は上寄せ */
    min-height: 100vh;        /* 高さを揃える */
}


h2 {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: #333;
}

/* コンテナレイアウト */
.container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

/* 画像エリア */
.image-box {
    flex: 0 0 300px;
    min-width: 250px;
}

.image-box img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* グラフエリア */
.chart-box {
    flex: 1;
    min-width: 400px;
    position: relative;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 1rem;
}

/* 評価情報 */
.summary {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 1rem 0 0.5rem 0;
    color: #333;
}

.stars {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ffd700;
}

.note {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

/* タブレット・スマホ対応 */
@media (max-width: 768px) {
    body {
        margin: 0.5rem;
    }

    h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .container {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .image-box {
        flex: none;
        width: 100%;
        max-width: 300px;
        order: 1;
    }

    .chart-box {
        flex: none;
        width: 100%;
        min-width: auto;
        order: 2;
    }

    .chart-container {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .chart-container {
        height: 250px;
    }

    .summary {
        font-size: 1.1rem;
    }

    .stars {
        font-size: 1.3rem;
    }
}