@import url('/css/bottleneck-legacy.css');

/* ========================================================================
   買い替え診断 — チェッカー本体（/bottleneck#checker）に見た目を揃える
   ========================================================================

   🚨 色を独自に作らないこと。
   /bottleneck 系は実証実験の導線で「見た目を変えるな」と決まっている
   （見た目が変わると実験の前後比較が切れる）。1行目の legacy import が
   その固定を担っているので外さない。

   ⭐ 本体（bottleneck.php）は --bn-* という変数体系を持っている。
      別の値を作らず、同じ変数を同じ意味で使う。値を変えたくなったら
      bottleneck.php 側の :root ブロックを直すこと（ここでは持たない）。

   本体から拾った作法：
     ・カード      = radius 12px / 枠 1px #d0d4da / 影は極薄の2段
     ・パネル・行  = radius 8px  / 枠 1px var(--bn-border)
     ・小さい札    = radius 4〜6px
     ・強調        = 左の色線は使わない（2026-10-01 運営者の点検で左線をやめた）。面の色と罫で示す
     ・良い/注意   = --bn-ok-* / --bn-warn-* （独自の緑・黄を作らない）
   ------------------------------------------------------------------------ */

.up-wrap,
.up-panel,
.up-card,
.up-verdict,
.up-section,
.up-disclaimer {
    --bn-accent: var(--color-primary, #2563eb);
    --bn-accent-strong: var(--color-primary-hover, #1d4ed8);
    --bn-accent-weak: rgba(37, 99, 235, 0.07);
    --bn-ok-text: #15803d;
    --bn-ok-bg: rgba(22, 163, 74, 0.14);
    --bn-warn-text: #b45309;
    --bn-warn-bg: rgba(217, 119, 6, 0.16);
    --bn-border: #d5d8de;
    --bn-text2: var(--color-text-secondary, #6b7280);
    --bn-text-mid: #4b5563;
    --bn-panel: var(--color-bg-secondary, #f6f7f9);
}
[data-theme="dark"] .up-wrap,
[data-theme="dark"] .up-panel,
[data-theme="dark"] .up-card,
[data-theme="dark"] .up-verdict,
[data-theme="dark"] .up-section,
[data-theme="dark"] .up-disclaimer {
    --bn-ok-text: #4ade80;
    --bn-ok-bg: rgba(22, 163, 74, 0.22);
    --bn-warn-text: #fbbf24;
    --bn-warn-bg: rgba(217, 119, 6, 0.22);
    --bn-border: rgba(255, 255, 255, 0.14);
    --bn-text-mid: #c2c8d4;
    --bn-panel: rgba(255, 255, 255, 0.04);
    --bn-accent-weak: rgba(124, 154, 239, 0.12);
}

.up-wrap{max-width:800px;margin:2rem auto;padding:0 1rem;color:var(--color-text,#1f2328)}
.up-breadcrumb{font-size:.82rem;color:var(--bn-text2);margin:0 0 .85rem}
.up-breadcrumb a{color:inherit}
.up-wrap h1{margin:0 0 .45rem;font-size:clamp(1.55rem,4vw,2rem);line-height:1.35}
.up-lead{margin:0 0 1.5rem;color:var(--bn-text2);line-height:1.75}

.up-panel,.up-card{
    background:var(--color-card-bg,#fff);border:1px solid #d0d4da;border-radius:12px;
    box-shadow:0 1px 2px rgba(16,24,40,.04),0 2px 6px rgba(16,24,40,.05);
}
.up-panel{padding:1.35rem}
[data-theme="dark"] .up-panel,[data-theme="dark"] .up-card{box-shadow:none;border-color:var(--bn-border)}

.up-tabs{display:inline-flex;gap:.4rem;margin-bottom:1.25rem}
.up-tab{padding:.5rem 1.3rem;border:1px solid var(--bn-border);border-radius:6px;background:transparent;
    color:inherit;font:inherit;font-weight:700;font-size:.9rem;cursor:pointer;transition:background .15s,border-color .15s}
.up-tab:hover{background:var(--bn-accent-weak);border-color:var(--bn-accent)}
.up-tab.is-active{background:var(--bn-accent);border-color:var(--bn-accent);color:#fff}
[data-theme="dark"] .up-tab.is-active{color:#14161b}
.up-tab:focus-visible{outline:3px solid var(--bn-accent);outline-offset:2px}

.up-fields{display:grid;grid-template-columns:1fr auto 1fr;align-items:end;gap:.8rem}
.up-field label{display:block;margin:0 0 .35rem;font-size:.84rem;font-weight:700}
.up-field input{width:100%;box-sizing:border-box;padding:.78rem .85rem;border:1px solid var(--bn-border);
    border-radius:8px;background:var(--color-card-bg,#fff);color:inherit;font:inherit}
.up-field input:focus-visible{outline:3px solid var(--bn-accent);outline-offset:1px;border-color:var(--bn-accent)}
.up-arrow{padding:0 0 .82rem;color:var(--bn-text2);font-weight:800}

.up-error{min-height:1.35rem;margin:.6rem 0 0;color:#a8261c;font-size:.84rem;font-weight:700}
[data-theme="dark"] .up-error{color:#f87171}

.up-submit{width:100%;margin-top:.75rem;padding:.85rem 1rem;border:none;border-radius:8px;
    background:var(--bn-accent);color:#fff;font:inherit;font-weight:800;cursor:pointer;transition:background .15s}
.up-submit:hover{background:var(--bn-accent-strong)}
.up-submit:focus-visible{outline:3px solid var(--bn-accent);outline-offset:2px}
[data-theme="dark"] .up-submit{color:#14161b}
.up-note{margin:1rem 0 0;color:var(--bn-text2);font-size:.8rem;line-height:1.6}

.up-route{display:flex;align-items:center;gap:.65rem;margin:1.25rem 0 1rem;
    font-size:clamp(1rem,3vw,1.25rem);font-weight:800;line-height:1.45}
.up-route span{color:var(--bn-accent)}

.up-verdict{padding:1.35rem 1.4rem;border:1px solid var(--bn-border);border-radius:8px;
    background:var(--bn-panel)}
.up-verdict.good{background:var(--bn-accent-weak)}
.up-verdict.caution{background:var(--bn-warn-bg)}
.up-verdict__eyebrow{margin:0 0 .25rem;font-size:.78rem;font-weight:700;color:var(--bn-text2)}
.up-verdict h2{margin:0 0 .35rem;font-size:1.35rem}
.up-verdict p{margin:0;line-height:1.7;color:var(--bn-text-mid)}
.up-score{font-size:1.08rem;font-weight:800;color:var(--bn-accent)}

.up-section{margin:2rem 0}
.up-section h2{margin:0 0 .8rem;font-size:1.25rem}

.up-table-scroll{overflow-x:auto;border:1px solid var(--bn-border);border-radius:8px}
.up-table{width:100%;min-width:560px;border-collapse:collapse;background:var(--color-card-bg,#fff)}
.up-table th,.up-table td{padding:.75rem .85rem;text-align:left;border-bottom:1px solid var(--bn-border)}
.up-table tr:last-child th,.up-table tr:last-child td{border-bottom:0}
.up-table th{width:22%;font-size:.82rem;color:var(--bn-text2);background:var(--bn-panel)}
.up-table td{font-variant-numeric:tabular-nums;color:var(--bn-text-mid)}

.up-delta{display:inline-block;margin-left:.45rem;padding:.08rem .45rem;border-radius:4px;
    font-size:.75rem;font-weight:700;font-variant-numeric:tabular-nums;color:var(--bn-text-mid)}
.up-delta.up{background:var(--bn-accent-weak)}
.up-delta.down{background:var(--bn-panel)}
.up-same{display:inline-block;margin-left:.45rem;font-size:.75rem;color:var(--bn-text2)}

.up-socket-note{margin:.8rem 0 0;padding:.85rem 1rem;border-radius:8px;
    background:var(--bn-warn-bg);line-height:1.65;color:var(--bn-text-mid)}

.up-price{margin:0 0 .8rem;font-size:.9rem;color:var(--bn-text2)}
.up-price strong{font-size:1.4rem;font-weight:800;color:var(--bn-accent);font-variant-numeric:tabular-nums;margin-left:.3rem}
.up-price span{font-size:.85rem;color:var(--bn-text2)}
.up-buy{display:grid;grid-template-columns:repeat(3,1fr);gap:.7rem}
.up-buy__btn{display:block;padding:.85rem;text-align:center;border:1px solid var(--bn-border);border-radius:8px;
    background:var(--color-card-bg,#fff);color:var(--bn-link,var(--bn-accent));font-weight:800;font-size:.92rem;
    text-decoration:none;transition:border-color .15s,background .15s}
.up-buy__btn:hover{border-color:var(--bn-accent);background:var(--bn-accent-weak)}
.up-buy__btn:focus-visible{outline:3px solid var(--bn-accent);outline-offset:2px}
.up-buy__note{margin:.8rem 0 0;font-size:.76rem;line-height:1.75;color:var(--bn-text2)}
[data-theme="dark"] .up-buy__btn{background:#1a1d24}
@media(max-width:680px){.up-buy{grid-template-columns:1fr}}

.up-links{display:grid;grid-template-columns:repeat(3,1fr);gap:.7rem}
.up-link{display:block;padding:.9rem;border:1px solid var(--bn-border);border-radius:8px;
    color:inherit;text-decoration:none;background:var(--color-card-bg,#fff);transition:border-color .15s,background .15s}
.up-link:hover{border-color:var(--bn-accent);background:var(--bn-accent-weak)}
.up-link:focus-visible{outline:3px solid var(--bn-accent);outline-offset:2px}
.up-link strong{display:block;margin-bottom:.2rem;color:var(--bn-link,var(--bn-accent));font-size:.92rem}
.up-link span{font-size:.78rem;color:var(--bn-text2)}

.up-faq{margin:.55rem 0;border:1px solid var(--bn-border);border-radius:8px;background:var(--color-card-bg,#fff)}
.up-faq summary{padding:.9rem 1rem;cursor:pointer;font-weight:700}
.up-faq summary:focus-visible{outline:3px solid var(--bn-accent);outline-offset:-2px;border-radius:8px}
.up-faq p{margin:0;padding:0 1rem 1rem;line-height:1.7;color:var(--bn-text2)}

.up-disclaimer{margin:2rem 0 0;padding-top:1rem;border-top:1px solid var(--bn-border);
    font-size:.78rem;line-height:1.7;color:var(--bn-text2)}
.up-back{display:inline-block;margin-top:1rem;color:var(--bn-link,var(--bn-accent));font-weight:700;text-decoration:none}
.up-related{display:flex;flex-wrap:wrap;gap:.65rem 1.35rem;margin-top:2rem;font-weight:700}
.up-related a{color:var(--bn-link,var(--bn-accent));text-underline-offset:3px}

[data-theme="dark"] .up-table,[data-theme="dark"] .up-link,
[data-theme="dark"] .up-faq,[data-theme="dark"] .up-field input{background:#1a1d24}

@media (prefers-reduced-motion: reduce){
    .up-tab,.up-submit,.up-link{transition:none}
}

@media(max-width:680px){
    .up-fields{grid-template-columns:1fr}
    .up-arrow{padding:0;text-align:center;transform:rotate(90deg)}
    .up-links{grid-template-columns:1fr}
    .up-related{display:grid;gap:.7rem}
    .up-panel{padding:1rem}
    .up-route{align-items:flex-start}
    .up-tabs{display:flex;width:100%}
    .up-tab{flex:1;padding:.55rem .5rem}
}
