/**
 * みんなの練習データ（リデザイン 2026-11）
 * 百人一首.jp — practice-focus.css の .pf トークンと部品の上に置く
 * 接頭辞: pf-st-
 * グラフは藍1色＋数値ラベル。最も低い／高い行は朱／緑青の帯に加えて「最も低い」などの文字タグで示す
 */

.pf-st { max-width: 760px; margin: 0 auto; }
.pf-st-head { margin: 4px 0 16px; }
.pf-st-loading { color: var(--pf-ink-3); font-size: 0.875rem; }
.pf-st-error {
    padding: 14px;
    border-radius: 14px;
    background: var(--pf-shu-soft);
    color: var(--pf-shu);
    font-size: 0.875rem;
}

.pf-st-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.pf-st-box {
    margin: 0 0 16px;
    padding: 18px 16px;
    border: 1px solid var(--pf-line);
    border-radius: 18px;
    background: var(--pf-surface);
}
.pf-st-h2 {
    margin: 0 0 4px;
    padding: 0;
    border: 0;
    font-family: var(--pf-ui);
    font-size: 1rem;
    font-weight: 700;
    color: var(--pf-ink);
}
.pf-st-note { margin: 0 0 14px; font-size: 0.75rem; color: var(--pf-ink-3); line-height: 1.6; }

/* ---- 要約 ---- */
.pf-st-summary { margin-bottom: 16px; }
.pf-st-tiles { margin: 0 0 10px; }
.pf-st-tile { padding: 14px 6px; }
.pf-st-tile small { font-size: 0.75rem; line-height: 1.4; }
.pf-st-tile b { display: inline-block; margin-top: 4px; font-size: 1.25rem; color: var(--pf-ai); }
.pf-st-unit { margin-left: 2px; font-size: 0.75rem; color: var(--pf-ink-3); }
.pf-st-headline {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--pf-ai-soft);
    color: var(--pf-ai);
    font-size: 0.875rem;
    line-height: 1.6;
}

.pf-st-fallback { background: var(--pf-ai-soft); border-color: transparent; }
.pf-st-fallback p { margin: 0 0 14px; font-size: 0.9375rem; color: var(--pf-ink-2); }

/* ---- 横棒 ---- */
.pf-st-bars { display: grid; gap: 14px; }
.pf-st-row-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.pf-st-row-label { font-size: 0.9375rem; font-weight: 700; }
.pf-st-row-value { margin-left: auto; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.pf-st-tag {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--pf-line-2);
    color: var(--pf-ink-2);
}
.pf-st-row.is-low .pf-st-tag { background: var(--pf-shu); color: #fff; }
.pf-st-row.is-high .pf-st-tag { background: var(--pf-rokusho); color: #fff; }
.pf-st-bar {
    height: 12px;
    border-radius: 6px;
    background: var(--pf-line-2);
    overflow: hidden;
}
.pf-st-bar i { display: block; height: 100%; border-radius: 6px; background: var(--pf-ai); }
.pf-st-row.is-low .pf-st-bar i { background: var(--pf-shu); }
.pf-st-row.is-high .pf-st-bar i { background: var(--pf-rokusho); }
.pf-st-row.is-empty .pf-st-row-value { font-weight: 400; color: var(--pf-ink-3); }
.pf-st-row-detail { margin: 5px 0 0; font-size: 0.75rem; color: var(--pf-ink-3); font-variant-numeric: tabular-nums; }
.pf-st-insight {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-left: 4px solid var(--pf-ai);
    border-radius: 0 12px 12px 0;
    background: var(--pf-paper);
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--pf-ink-2);
}

/* ---- 14日間（スマホ: 横棒の行／PC: 縦棒） ---- */
.pf-st-trend { display: grid; gap: 4px; }
.pf-st-day {
    display: grid;
    grid-template-columns: 4.6em 1fr 3.2em;
    align-items: center;
    gap: 8px;
    min-height: 22px;
}
.pf-st-day-d,
.pf-st-day-n {
    font-size: 0.75rem;
    color: var(--pf-ink-3);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.pf-st-day-n { text-align: right; color: var(--pf-ink-2); }
.pf-st-day-bar { display: block; height: 12px; border-radius: 4px; background: var(--pf-line-2); overflow: hidden; }
.pf-st-day-bar i { display: block; width: var(--v); height: 100%; border-radius: 4px; background: #8EA3C9; }
.pf-st-day.is-today .pf-st-day-bar i { background: var(--pf-ai); }
.pf-st-day.is-today .pf-st-day-d,
.pf-st-day.is-today .pf-st-day-n { color: var(--pf-ai); font-weight: 700; }

@media (min-width: 700px) {
    .pf-st-trend {
        grid-template-columns: repeat(14, minmax(0, 1fr));
        align-items: stretch;
        gap: 8px;
        height: 220px;
    }
    .pf-st-day {
        position: relative;
        display: flex;
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 0;
        min-width: 0;
        padding-top: 20px;
    }
    .pf-st-day-n {
        position: absolute;
        left: 0; right: 0;
        /* 棒の先端のすぐ上に置く（日付 26px・上の余白 20px を除いた高さ × 割合） */
        bottom: calc(26px + (100% - 46px) * var(--vn) + 4px);
        line-height: 1;
    }
    .pf-st-day-d, .pf-st-day-n { text-align: center; }
    .pf-st-day-d { height: 26px; box-sizing: border-box; padding-top: 6px; border-top: 1px solid var(--pf-line); }
    .pf-st-day-bar { flex: 1; display: flex; align-items: flex-end; height: auto; background: none; border-radius: 0; }
    .pf-st-day-bar i { width: 100%; height: var(--v); border-radius: 4px 4px 0 0; }
}

.pf-st-updated { margin: 0 0 8px; text-align: right; font-size: 0.75rem; color: var(--pf-ink-3); }

@media (min-width: 860px) {
    .pf-st { max-width: 980px; }
    .pf-st-head { max-width: 640px; }
    .pf-st-box { padding: 22px; }
    .pf-st-tile b { font-size: 1.875rem; }
}
