/* Dis Media Article Stats - 表示スタイル */

.dism-stats {
    background: #fffaeb;
    border: 2px solid #fcd34d;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 32px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    color: #2d2d2d;
    line-height: 1.6;
}
/* テーマCSSの干渉を防ぐ */
.dism-stats > p:empty,
.dism-stats > br {
    display: none !important;
}
.dism-stats > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
.dism-stats__title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    color: #1a1a1a;
}
.dism-stats__period {
    font-size: 12px;
    color: #888;
    margin-bottom: 18px;
}
.dism-stats__section {
    border-top: 1px solid #f3e6b1;
    padding: 14px 0;
}
.dism-stats__section:last-child {
    padding-bottom: 4px;
}
.dism-stats__section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #2d6a4f;
    margin-bottom: 10px;
}

/* 検索クエリ */
.dism-stats__queries {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: query-counter;
}
.dism-stats__queries li {
    counter-increment: query-counter;
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 14px;
}
.dism-stats__queries li::before {
    content: counter(query-counter);
    background: #2d6a4f;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.dism-stats__queries .query-text {
    font-weight: 500;
}
.dism-stats__queries .query-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 11px;
    color: #666;
    white-space: nowrap;
}
.dism-stats__queries .query-meta strong {
    color: #2d6a4f;
    font-size: 13px;
}

/* エンゲージメント時間 */
.dism-stats__engagement {
    display: flex;
    gap: 20px;
    align-items: baseline;
    flex-wrap: wrap;
}
.dism-stats__engagement-main {
    font-size: 26px;
    font-weight: 700;
    color: #2d6a4f;
}
.dism-stats__engagement-unit {
    font-size: 13px;
    color: #555;
}
.dism-stats__engagement-sub {
    font-size: 12px;
    color: #888;
}

/* バー */
.dism-stats__bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dism-stats__bar {
    display: grid;
    grid-template-columns: 80px 1fr 50px;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.dism-stats__bar-label {
    color: #555;
}
.dism-stats__bar-track {
    height: 8px;
    background: #f3e6b1;
    border-radius: 4px;
    overflow: hidden;
}
.dism-stats__bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2d6a4f, #52b788);
    border-radius: 4px;
}
.dism-stats__bar-value {
    text-align: right;
    color: #2d6a4f;
    font-weight: 600;
    font-size: 13px;
}

/* ヒートマップ */
.dism-stats__hours {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 2px;
    margin-top: 6px;
}
.dism-stats__hour-cell {
    aspect-ratio: 1;
    border-radius: 2px;
}
.dism-stats__hour-axis {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 2px;
    font-size: 9px;
    color: #888;
    text-align: center;
    margin-top: 4px;
}
.dism-stats__hour-peak {
    font-size: 12px;
    color: #555;
    margin-top: 8px;
    text-align: center;
}

/* 新規/リピート */
.dism-stats__nvr {
    display: flex;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    margin-top: 6px;
}
.dism-stats__nvr-new {
    background: #52b788;
}
.dism-stats__nvr-ret {
    background: #2d6a4f;
}
.dism-stats__nvr-legend {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #555;
    margin-top: 8px;
}
.dism-stats__nvr-legend span::before {
    content: "■";
    margin-right: 4px;
}
.dism-stats__nvr-legend .new::before { color: #52b788; }
.dism-stats__nvr-legend .ret::before { color: #2d6a4f; }

@media (max-width: 600px) {
    .dism-stats {
        padding: 16px 18px;
    }
    .dism-stats__bar {
        grid-template-columns: 70px 1fr 45px;
        font-size: 12px;
    }
    .dism-stats__hour-cell {
        border-radius: 1px;
    }
    .dism-stats__queries li {
        grid-template-columns: 22px 1fr;
        grid-template-rows: auto auto;
    }
    .dism-stats__queries li::before {
        grid-row: 1 / span 2;
    }
    .dism-stats__queries .query-meta {
        flex-direction: row;
        gap: 10px;
        align-items: center;
        grid-column: 2;
    }
}
