/* よりコンパクトなSPデザイン */
.aggregate_wrapper {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 0 16px 0;
    /* background: #fafafa; */
    min-height: 100vh;
    overflow: visible !important;
    position: relative;
}
.aggregate_title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: bold;
    margin-bottom: 48px;
}
.aggregate_title_small {
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
}
.aggregate_tab_area {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}
.aggregate_tab_btn {
    width: 120px;
    height: 36px;
    border-radius: 8px;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    background: #a0a0a0;
    color: #fff;
    transition: background 0.2s;
    padding: 0;
}
.aggregate_tab_btn--active {
    background: #0080f8;
}
.aggregate_list_area {
    margin-top: 8px;
}
.aggregate_item {
    background: #fff;
    border-radius: 0;
    margin-bottom: 16px;
    padding: 12px 8px 4px 8px;
    box-shadow: none;
    border-bottom: 1px solid #888;
}
.aggregate_label {
    display: inline-block;
    font-size: 1.0rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    margin-right: 4px;
}
.aggregate_label--gray {
    background: #a0a0a0;
    color: #fff;
}
.aggregate_label--blue {
    background: #0080f8;
    color: #fff;
}
.aggregate_circles {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    color: #222;
}
.aggregate_period_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}
.aggregate_period {
    font-size: 1.0rem;
    color: #888;
}
.aggregate_arrow {
    font-size: 1.4rem;
    color: #888;
    margin-left: 4px;
}

/* よりコンパクトなPCデザイン */
@media (min-width: 768px) {
    .aggregate_wrapper {
        max-width: 900px;
        padding: 0 0 24px 0;
    }
    .aggregate_title {
        font-size: 3.2rem;
        margin-bottom: 56px;
    }
    .aggregate_tab_area {
        gap: 24px;
        margin-bottom: 32px;
    }
    .aggregate_tab_btn {
        width: 180px;
        height: 40px;
        font-size: 1.4rem;
    }
    .aggregate_list_area {
        margin-top: 12px;
    }
    .aggregate_item {
        padding: 16px 16px 6px 16px;
        margin-bottom: 20px;
    }
    .aggregate_label {
        font-size: 1.1rem;
        padding: 3px 12px;
        border-radius: 8px;
    }
    .aggregate_circles {
        font-size: 1.4rem;
    }
    .aggregate_period {
        font-size: 1.1rem;
    }
    .aggregate_arrow {
        font-size: 1.6rem;
    }
}

/* リンク感を強調するためのホバーアニメーション */
.aggregate_item_link {
    display: block;
    transition: background 0.2s, transform 0.2s;
}
.aggregate_item_link:hover .aggregate_item {
    background: #e6f0fa;
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.aggregate_title_detail {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
}

.aggregate_detail_balloon {
    max-width: 600px;
    margin: 0 auto 48px auto;
    padding: 32px 24px 80px 24px;
    background: #fff;
    border: 2px solid #231815;
    border-radius: 28px;
    position: relative;
    box-sizing: border-box;
    overflow: visible;
    z-index: 1;
}
.aggregate_detail_balloon::before,
.aggregate_detail_balloon::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
}
.aggregate_detail_balloon::before {
    bottom: -22px;
    border-left: 26px solid transparent;
    border-right: 26px solid transparent;
    border-top: 22px solid #231815;
    z-index: 1;
}
.aggregate_detail_balloon::after {
    bottom: -20px;
    border-left: 24px solid transparent;
    border-right: 24px solid transparent;
    border-top: 20px solid #fff;
    z-index: 2;
}

.aggregate_detail_answers {
    max-width: 600px;
    margin: 0 auto;
}
.aggregate_detail_answer {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 16px 16px 10px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    display: block;
}
.aggregate_detail_text {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #222;
    word-break: break-all;
    line-height: 1.3;
}
.aggregate_detail_meta_group {
    text-align: right;
    min-width: 120px;
    margin-top: 0;
}
.aggregate_detail_meta {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 2px;
}

@media (max-width: 600px) {
    .aggregate_detail_balloon, .aggregate_detail_answers {
        max-width: 98vw;
        padding-left: 8px;
        padding-right: 8px;
    }
    .aggregate_detail_balloon {
        padding: 20px 8px 48px 8px;
    }
    .aggregate_detail_answer {
        display: block;
    }
    .aggregate_detail_meta_group {
        text-align: right;
        margin-top: 0;
        min-width: 0;
        width: 100%;
    }
    .aggregate_chart_area div:nth-child(2) {
        margin-top: 24px;
    }
}
