/**
 * 選挙マッチング診断ページ（page-election-matching.php）専用スタイル
 *
 * 以前はテンプレートファイル内に<style>としてインライン記述されており、
 * PHP・HTML・JSと同居していた。ここに切り出すことで：
 *   - ブラウザキャッシュが効くようになる
 *   - テンプレート側の見通しが良くなる
 * このCSSにPHPの動的埋め込み値は含まれていない（確認済み）ため、そのまま切り出せる。
 * 読み込みは functions.php 側で page-election-matching.php テンプレートの時だけ enqueue。
 *
 * 【デプロイ時の注意】このファイルは新規追加ファイルなので、更新時は必ず
 * このファイルごとアップロードすること。PHP側だけ更新してこのCSSが本番に
 * まだ存在しないと、ページ全体が無装飾で表示される（実際に一度発生した）。
 */
.msr-el {
    --p: #0d9488;
    --p-dark: #0f766e;
    --p-light: #f0fdfa;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --radius: 16px;

    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 18px 120px;
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
    color: var(--ink);
}

.msr-el *, .msr-el *::before, .msr-el *::after { box-sizing: border-box; }

/* ============ ① ヒーロー ============ */
.msr-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 55%, #14b8a6 100%);
    border-radius: 24px;
    padding: 44px 28px 36px;
    margin-bottom: 36px;
    text-align: center;
}
.msr-hero * { color: #fff !important; }

/* 背景の装飾グリッド */
.msr-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.14) 0, transparent 42%),
        radial-gradient(circle at 82% 72%, rgba(255,255,255,.10) 0, transparent 40%);
    pointer-events: none;
}
.msr-hero > * { position: relative; z-index: 1; }

.msr-hero h1 {
    font-size: clamp(22px, 4.4vw, 32px);
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 12px;
}
.msr-hero-desc {
    font-size: 14px;
    line-height: 1.8;
    opacity: .95;
    margin: 0 auto 26px;
    max-width: 620px;
}

/* KPI */
.msr-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 560px;
    margin: 0 auto 26px;
}
.msr-kpi {
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 14px;
    padding: 14px 8px;
    backdrop-filter: blur(4px);
}
.msr-kpi-num {
    font-size: clamp(24px, 5vw, 34px);
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.msr-kpi-num small { font-size: 14px; font-weight: 700; margin-left: 2px; }
.msr-kpi-label { font-size: 11px; opacity: .9; margin-top: 4px; letter-spacing: .02em; }

.msr-hero-dates {
    display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 24px;
}
.msr-hero-dates span {
    font-size: 12px; font-weight: 700;
    background: rgba(0,0,0,.14);
    border-radius: 999px;
    padding: 6px 14px;
}

.msr-hero-cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff;
    color: var(--p-dark) !important;
    font-weight: 800; font-size: 15px;
    padding: 15px 34px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
    transition: transform .25s, box-shadow .25s;
}
.msr-hero-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.24); }
/* .msr-hero * { color:#fff !important; } が矢印の <span> にも直接かかってしまい、
   白背景のボタンの上で矢印が白＝透明に見え、テキストが中央からズレて見えていた。
   ボタン内の要素は明示的に濃色を指定して上書きする。 */
.msr-hero-cta, .msr-hero-cta * { color: var(--p-dark) !important; }
.msr-hero-cta .arrow { transition: transform .25s; }
.msr-hero-cta:hover .arrow { transform: translateX(4px); }
.msr-hero-cta.msr-hero-cta-disabled {
    background: rgba(255,255,255,.55);
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}
.msr-hero-cta.msr-hero-cta-disabled, .msr-hero-cta.msr-hero-cta-disabled * {
    color: var(--p-dark) !important;
    opacity: .75;
}

/* ============ セクション共通 ============ */
.msr-sec { margin-bottom: 44px; scroll-margin-top: 20px; }
.msr-sec-head { margin-bottom: 18px; }
.msr-sec-title {
    font-size: 20px; font-weight: 800; color: var(--p-dark);
    display: flex; align-items: center; gap: 9px; margin: 0 0 6px;
}
.msr-sec-sub { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0; }

.msr-card {
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

/* ============ 信頼度バッジ ============ */
.msr-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 700;
    padding: 4px 10px; border-radius: 999px;
    white-space: nowrap;
}
.msr-badge.green  { background: #d1fae5; color: #065f46; }
.msr-badge.yellow { background: #fef3c7; color: #92400e; }
.msr-badge.red    { background: #fee2e2; color: #991b1b; }

.msr-legend {
    display: flex; gap: 10px; flex-wrap: wrap;
    background: var(--p-light);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 12px; color: var(--muted);
    align-items: center;
}
.msr-legend b { color: var(--p-dark); font-size: 12px; }

/* ネット調査由来のデータであることの注記 */
.msr-research-note {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 11px 13px;
    font-size: 11.5px;
    color: #92400e;
    line-height: 1.7;
    text-align: left;
    margin-bottom: 12px;
}
.msr-research-note strong { display: block; margin-bottom: 2px; }

.msr-evidence {
    font-size: 11.5px; color: #92400e; background: #fffbeb;
    border-radius: 8px; padding: 9px 11px; margin-top: 8px; line-height: 1.7;
}
.msr-evidence a { color: #b45309; font-weight: 700; }
/* :hover未指定だと親テーマ既定の赤系ホバー色に落ちるため、明示的に指定しておく */
.msr-evidence a:hover { color: #92400e !important; text-decoration: underline; }
.msr-conf {
    display: inline-block; font-size: 10px; font-weight: 800;
    padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: 1px;
}
.msr-conf.high   { background: #d1fae5; color: #065f46; }
.msr-conf.medium { background: #fef3c7; color: #92400e; }
.msr-conf.low    { background: #fee2e2; color: #991b1b; }

/* ============ ② 候補者カード ============ */
.msr-cand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 18px;
}
.msr-cand {
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px 22px;
    text-align: center;
    position: relative;
    transition: transform .25s, box-shadow .25s, border-color .25s;
    border-top: 4px solid var(--cand-color, var(--p));
}
.msr-cand:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(15,23,42,.09);
}
.msr-cand-photo, .msr-cand-photo-ph {
    width: 120px; height: 120px; border-radius: 50%;
    margin: 0 auto 14px; display: block;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 0 0 3px var(--cand-color, var(--p));
}
.msr-cand-photo-ph {
    background: var(--p-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 44px;
}
.msr-cand-name { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.msr-cand-meta { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.msr-tag { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.msr-tag.age { background: var(--p-light); color: var(--p-dark); }
.msr-tag.inc { background: #e5e7eb; color: #374151; }
.msr-tag.new { background: #dbeafe; color: #1e40af; }
.msr-tag.pos { background: #fef3c7; color: #92400e; }

.msr-cand-stance-label {
    font-size: 11px; font-weight: 700; color: var(--p);
    text-align: left; margin-bottom: 4px;
}
.msr-cand-bio {
    font-size: 13px; color: var(--ink); line-height: 1.8;
    text-align: left;
    max-height: 4.9em; overflow: hidden; position: relative;
    transition: max-height .35s ease;
}
.msr-cand-bio.open { max-height: 60em; }
.msr-cand-bio:not(.open)::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2em;
    background: linear-gradient(transparent, #fff);
}
.msr-bio-toggle {
    background: none; border: none; cursor: pointer; padding: 6px 0 0;
    font-size: 12px; font-weight: 700; color: var(--p);
}
/* リンクの出どころ表記。本人提供か運営調べかを、候補者間で差が出ないよう
   全カード共通の位置に必ず出す（詳細は page-election-matching.php のコメント参照）。 */
.msr-cand-links-label {
    margin-top: 14px; font-size: 11px; font-weight: 700; color: var(--muted, #666);
    text-transform: none;
}
.msr-cand-links { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.msr-cand-links a {
    font-size: 12px; font-weight: 700; color: var(--p); text-decoration: none;
}
.msr-cand-links a:hover { text-decoration: underline; }
.msr-cand-links-empty {
    margin-top: 6px; font-size: 12px; color: var(--muted, #666); line-height: 1.6;
}

/* ============ ③ 争点まとめ（軸重ね型） ============ */
.msr-axis-legend {
    display: flex; gap: 14px; flex-wrap: wrap;
    padding-bottom: 16px; margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
}
.msr-axis-legend-item {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 700;
}
.msr-axis-legend-dot { width: 12px; height: 12px; border-radius: 50%; }

.msr-issue { padding: 22px 0; border-bottom: 1px solid var(--line); }
.msr-issue:last-child { border-bottom: none; padding-bottom: 4px; }
.msr-issue-title { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.msr-issue-desc { font-size: 12px; color: var(--p); margin-bottom: 16px; line-height: 1.6; }

/* 「🎯 最大争点」だけ、基本7項目（優先度）とはっきり見分けがつくように強調する。
   賛否・方向性の軸と、優先度の軸を同じ見た目のまま並べると、正反対の立場が
   「似ている」ように誤読される（詳しくは msr_default_policy_questions のコメント参照）。
   以前は背景グラデーション＋上部の太い帯＋グラデーション付きバッジ＋着色トラックを
   全部重ねていたが、シグナルが多すぎて「縁取りだらけの塊」に見えていた。
   バッジ1つ＋薄い背景＋細い枠線だけに絞る。 */
.msr-issue.is-issue {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 16px;
}
.msr-issue-badge {
    display: inline-block;
    font-size: 10.5px; font-weight: 800; color: #92400e;
    background: #fef3c7; letter-spacing: 0.01em;
    padding: 3px 9px; border-radius: 999px; margin-bottom: 8px;
}

.msr-track-row {
    display: grid;
    grid-template-columns: minmax(72px, 116px) 1fr minmax(72px, 116px);
    gap: 12px; align-items: center;
}
.msr-track-label { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.msr-track-label.right { text-align: right; }

.msr-track {
    position: relative; height: 10px; border-radius: 999px;
    background: linear-gradient(90deg, #e0f2fe, #f0fdfa, #fef3c7);
}
.msr-track::after {
    content: ''; position: absolute; left: 50%; top: -4px; bottom: -4px;
    width: 1px; background: var(--line);
}
.msr-dot {
    position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(15,23,42,.22);
    cursor: default;
    transition: left .5s cubic-bezier(.2,.8,.2,1);
}
.msr-dot-you {
    position: absolute; top: 50%; width: 26px; height: 26px;
    transform: translate(-50%, -50%);
    display: flex; align-items: center; justify-content: center;
    background: var(--ink); color: #fff;
    border: 3px solid #fff; border-radius: 50%;
    font-size: 12px; z-index: 5;
    box-shadow: 0 3px 10px rgba(15,23,42,.35);
    animation: msrPop .4s cubic-bezier(.2,1.4,.4,1);
}
@keyframes msrPop { from { transform: translate(-50%,-50%) scale(0); } to { transform: translate(-50%,-50%) scale(1); } }

/* 争点まとめの「未回答」表示。以前は薄いグレー1色の文字列（#94a3b8）だけで、
   下の濃い文字の回答コメントとのコントラストが弱く見づらかった（2026-09-13指摘）。
   カード背景の色分けまではせず、名前ごとにチップで区切り文字色も一段濃くすることで
   「誰が答えていないか」を名前単位でぱっと拾えるようにする。 */
.msr-issue-unanswered {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    margin: 4px 0 10px;
}
.msr-issue-unanswered-label {
    font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .02em;
}
.msr-issue-unanswered-chip {
    font-size: 12px; font-weight: 700; color: #475569;
    background: #f1f5f9; border: 1px dashed #cbd5e1; border-radius: 999px;
    padding: 2px 10px;
}

.msr-issue-comments { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.msr-issue-comment {
    font-size: 12.5px; color: var(--muted); line-height: 1.7;
    padding-left: 12px; border-left: 3px solid var(--cmt-color, var(--line));
}
.msr-issue-comment b { color: var(--ink); }

/* ============ ④ 診断フォーム ============ */
.msr-quiz { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; }

.msr-quiz-head { padding: 20px 24px 0; }
.msr-progress-meta {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 12px; color: var(--muted); margin-bottom: 8px;
}
.msr-progress-meta strong { font-size: 15px; color: var(--p-dark); }
.msr-progress {
    height: 8px; background: var(--p-light); border-radius: 999px; overflow: hidden;
}
.msr-progress-bar {
    height: 100%; background: linear-gradient(90deg, var(--p), #14b8a6);
    border-radius: 999px; width: 0;
    transition: width .45s cubic-bezier(.2,.8,.2,1);
}
.msr-dots { display: flex; gap: 5px; justify-content: center; padding: 14px 24px 0; flex-wrap: wrap; }
.msr-dots i {
    width: 8px; height: 8px; border-radius: 50%; background: var(--line);
    transition: background .25s, transform .25s;
}
.msr-dots i.done { background: var(--p); }
.msr-dots i.current { transform: scale(1.6); background: var(--p-dark); }

.msr-q { padding: 26px 24px 24px; }
/* 「🎯 最大争点」の設問は、バッジ1つだけで基本7項目（優先度）と見分けをつける。
   以前は帯・グラデーションバッジ・スライダー枠・トラック・つまみ・重視度ボタンまで
   全部着色していたが、シグナルを盛りすぎて「縁取りだらけの塊」に見えるだけだった
   （争点まとめセクションで実際に指摘を受けた）。1箇所を目立たせたら、あとは
   静かにしておく。 */
.msr-q-badge {
    display: inline-block;
    font-size: 11px; font-weight: 800; color: #92400e;
    background: #fef3c7; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.msr-q-label { font-size: 18px; font-weight: 800; line-height: 1.5; margin-bottom: 6px; }
.msr-q-desc { font-size: 12.5px; color: var(--p); line-height: 1.65; margin-bottom: 22px; }

.msr-q-slider-wrap {
    background: var(--p-light); border-radius: 14px; padding: 22px 20px 18px; margin-bottom: 20px;
}
.msr-q-value {
    text-align: center; font-size: 15px; font-weight: 800; color: var(--p-dark);
    min-height: 26px; margin-bottom: 12px;
}
.msr-q-value.empty { color: #94a3b8; font-weight: 700; font-size: 13px; }

.msr-slider {
    width: 100%; height: 8px; border-radius: 999px;
    background: linear-gradient(90deg, #cbd5e1, #fff, #cbd5e1);
    outline: none; -webkit-appearance: none; appearance: none; cursor: pointer;
}
/* outline を消しているぶん、キーボード操作時につまみ側で現在位置が分かるようにする。
   診断の主要な入力なので、フォーカスが見えないとキーボードだけでは操作できない。 */
.msr-slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px var(--p-light), 0 0 0 6px var(--p);
}
.msr-slider:focus-visible::-moz-range-thumb {
    box-shadow: 0 0 0 4px var(--p-light), 0 0 0 6px var(--p);
}
.msr-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 30px; height: 30px; border-radius: 50%;
    background: #fff; border: 3px solid #cbd5e1; cursor: grab;
    box-shadow: 0 3px 10px rgba(15,23,42,.16);
    transition: border-color .2s, transform .15s;
}
.msr-slider.touched::-webkit-slider-thumb { background: var(--p); border-color: #fff; box-shadow: 0 0 0 3px var(--p), 0 3px 10px rgba(13,148,136,.35); }
.msr-slider::-webkit-slider-thumb:active { transform: scale(1.12); }
.msr-slider::-moz-range-thumb {
    width: 30px; height: 30px; border-radius: 50%;
    background: #fff; border: 3px solid #cbd5e1; cursor: grab;
    box-shadow: 0 3px 10px rgba(15,23,42,.16);
}
.msr-slider.touched::-moz-range-thumb { background: var(--p); border-color: #0d9488; }

.msr-slider-ends {
    display: flex; justify-content: space-between; gap: 14px;
    margin-top: 12px; font-size: 12px; color: var(--muted); font-weight: 700;
}
.msr-slider-ends span { max-width: 45%; line-height: 1.4; }
.msr-slider-ends span:last-child { text-align: right; }

.msr-weight { margin-bottom: 22px; }
.msr-weight-label { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.msr-weight-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.msr-weight-btns button {
    padding: 11px 6px; border: 1.5px solid var(--line); background: #fff;
    border-radius: 10px; cursor: pointer; font-size: 12.5px; font-weight: 700;
    color: var(--muted); transition: all .2s;
}
/* ボタン系は文字色を変えるのではなく、ボタン自体が動くことでホバーを伝える（サイト内で統一） */
.msr-weight-btns button:hover { border-color: var(--p); transform: translateY(-2px); }
.msr-weight-btns button.on {
    background: var(--p); border-color: var(--p); color: #fff;
    box-shadow: 0 4px 12px rgba(13,148,136,.3);
}

.msr-q-nav { display: flex; gap: 10px; align-items: center; }
.msr-btn {
    border: none; cursor: pointer; font-weight: 800; font-size: 14px;
    border-radius: 999px; padding: 14px 26px; transition: all .25s;
    font-family: inherit;
}
.msr-btn-primary { background: var(--p); color: #fff; flex: 1; }
/* 親テーマ（Cocoon）既定のリンクホバー色（赤系）対策。このクラスは主に<button>で
   使っているため実害は出ないが、<a>（争点まとめを見る、等）にも使われる箇所があり
   そちらは実際に赤くなる。色は base と同じ値を !important で固定する。 */
.msr-btn-primary:hover { background: var(--p-dark); color: #fff !important; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(13,148,136,.3); }
.msr-btn-primary:disabled { background: #cbd5e1; cursor: not-allowed; transform: none; box-shadow: none; }
.msr-btn-ghost { background: #fff; border: 1.5px solid var(--line); color: var(--muted); }
.msr-btn-ghost:hover { border-color: var(--p); color: var(--muted) !important; transform: translateY(-2px); }
.msr-btn-text { background: none; color: var(--muted); text-decoration: underline; padding: 14px 10px; }

.msr-quiz-foot {
    background: #f8fafc; border-top: 1px solid var(--line);
    padding: 14px 24px; font-size: 11.5px; color: var(--muted); line-height: 1.7;
}

/* ============ 結果 ============ */
.msr-res-top {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    border-radius: 22px; padding: 32px 26px; margin-bottom: 22px;
    text-align: center; position: relative; overflow: hidden;
}
.msr-res-top * { color: #fff !important; }
.msr-res-top-eyebrow {
    font-size: 12px; font-weight: 700; letter-spacing: .1em;
    background: rgba(255,255,255,.2); border-radius: 999px;
    padding: 5px 16px; display: inline-block; margin-bottom: 20px;
}
.msr-ring-wrap { position: relative; width: 168px; height: 168px; margin: 0 auto 18px; }
.msr-ring { transform: rotate(-90deg); }
.msr-ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.msr-ring .bg { stroke: rgba(255,255,255,.22); }
.msr-ring .fg { stroke: #fff; transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1); }
.msr-ring-inner {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.msr-ring-photo { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; margin-bottom: 4px; border: 2px solid rgba(255,255,255,.6); }
.msr-ring-pct { font-size: 34px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.msr-ring-pct small { font-size: 16px; }
.msr-res-top-name { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.msr-res-top-meta { display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.msr-res-top-meta .msr-tag, .msr-res-top-meta .msr-badge {
    background: rgba(255,255,255,.2) !important; color: #fff !important;
}
.msr-res-top-note { font-size: 13px; opacity: .95; line-height: 1.7; max-width: 480px; margin: 0 auto; }

.msr-res-item {
    background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
    padding: 20px; margin-bottom: 14px;
}
.msr-res-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.msr-res-rank {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    background: var(--p-light); color: var(--p-dark);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px;
}
.msr-res-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--p-light); }
.msr-res-photo-ph {
    width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; background: var(--p-light);
    display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.msr-res-id { flex: 1; min-width: 0; }
.msr-res-name { font-size: 16px; font-weight: 800; margin-bottom: 5px; }
.msr-res-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.msr-res-pct { font-size: 26px; font-weight: 800; color: var(--p); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.msr-res-pct small { font-size: 14px; }

.msr-res-bar { height: 8px; background: var(--p-light); border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.msr-res-bar > div { height: 100%; background: linear-gradient(90deg, var(--p), #14b8a6); border-radius: 999px; width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1); }

.msr-hl { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.msr-hl-row { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.6; }
.msr-hl-key { font-weight: 800; white-space: nowrap; }
.msr-hl-row.agree .msr-hl-key { color: #059669; }
.msr-hl-row.diff .msr-hl-key { color: #d97706; }
.msr-hl-val { color: var(--muted); }

.msr-res-src { font-size: 12px; background: var(--p-light); border-radius: 8px; padding: 9px 12px; }
.msr-res-src a { color: var(--p); font-weight: 700; text-decoration: none; margin-right: 12px; }
.msr-res-src a:hover { text-decoration: underline; }

/* シェア */
.msr-share { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; margin-top: 22px; }
.msr-share h3 { font-size: 15px; font-weight: 800; color: var(--p-dark); margin: 0 0 6px; }
.msr-share p { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 0 0 14px; }
.msr-share-opt {
    display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--muted);
    background: #f8fafc; border-radius: 10px; padding: 12px; margin-bottom: 14px; cursor: pointer;
    line-height: 1.65;
}
.msr-share-preview {
    font-size: 12.5px; color: var(--ink); background: var(--p-light);
    border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; line-height: 1.7;
    word-break: break-word;
}
.msr-share-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.msr-share-btns a, .msr-share-btns button {
    flex: 1; min-width: 104px; text-align: center; text-decoration: none;
    padding: 12px 10px; border-radius: 10px; font-size: 13px; font-weight: 800;
    color: #fff; border: none; cursor: pointer; font-family: inherit;
}
.msr-sh-x { background: #000; }
.msr-sh-line { background: #06c755; }
.msr-sh-th { background: #333; }
.msr-sh-copy { background: var(--muted); }

/* スティッキーCTA */
.msr-sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 24px rgba(15,23,42,.09);
    transform: translateY(110%);
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.msr-sticky.show { transform: translateY(0); }
.msr-sticky-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.msr-sticky-txt { flex: 1; font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.msr-sticky-txt small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.msr-sticky a {
    background: var(--p); color: #fff; text-decoration: none;
    font-weight: 800; font-size: 13.5px; padding: 13px 24px; border-radius: 999px;
    white-space: nowrap; flex-shrink: 0;
}

.msr-empty {
    background: #fff; border: 1.5px dashed var(--line); border-radius: var(--radius);
    padding: 34px; text-align: center; color: var(--muted); font-size: 13px;
}
.msr-alert {
    background: #fef3c7; border: 1px solid #f59e0b; border-radius: 12px;
    padding: 14px 18px; margin-bottom: 20px; font-size: 13px; color: #92400e; line-height: 1.7;
}
.msr-err { color: #b91c1c; font-size: 13px; margin-top: 12px; font-weight: 700; }

/* 管理者プレビュー中の常時表示バッジ。ページ上部の注意書きだけだと、スクロールして
   途中のセクションだけを見ている人（まさに今回の混同）が見落とすため、
   スクロール位置に関係なくずっと見える形で二重に知らせる。 */
.msr-preview-badge {
    position: fixed; top: 12px; right: 12px; z-index: 9999;
    background: #dc2626; color: #fff !important; font-size: 12px; font-weight: 800;
    padding: 8px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.25);
    display: flex; align-items: center; gap: 6px; line-height: 1.4;
}
/* WPの管理バー（ログイン中は上部に固定表示）に隠れないよう分だけ下げる。
   管理バーの高さは画面幅で変わる（783px以上=32px、782px以下=46px。WP本体のCSSに合わせた値）。 */
body.admin-bar .msr-preview-badge { top: 44px; }
@media (max-width: 782px) {
    body.admin-bar .msr-preview-badge { top: 58px; }
}
@media (max-width: 640px) {
    .msr-preview-badge,
    body.admin-bar .msr-preview-badge {
        top: auto; bottom: 12px; right: 12px; left: 12px; justify-content: center;
    }
}

@media (max-width: 640px) {
    .msr-el { padding: 16px 14px 120px; }
    .msr-hero { padding: 32px 20px 28px; border-radius: 20px; }
    .msr-kpis { gap: 8px; }
    .msr-kpi { padding: 12px 4px; }
    .msr-card, .msr-q, .msr-quiz-head { padding-left: 16px; padding-right: 16px; }
    .msr-track-row { grid-template-columns: 1fr; gap: 6px; }
    .msr-track-label.right { text-align: left; }
    .msr-track { margin: 8px 0; }
    .msr-res-pct { font-size: 21px; }
    .msr-share-btns a, .msr-share-btns button { min-width: 0; }
    .msr-cand-bio { color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
    .msr-el *, .msr-el *::before { transition: none !important; animation: none !important; }
}
