/* ============================================================
   高金利通貨の比較（money/high-yield-currency.html）だけの見た目
   共通の変数（money.css・ek.css の v2 層）の上に重ねる。
   線の6色は通貨に固定（並べ替えても色は変えない）。明るい画面・暗い画面それぞれで色の見分けを確かめた値
   ============================================================ */
.hy-chart, .hy-tip, .mo-legend {
  --hy-TRY: #2a78d6; --hy-MXN: #eb6834; --hy-ZAR: #1baf7a; --hy-AUD: #eda100; --hy-USD: #e87ba4; --hy-EUR: #008300;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .hy-chart, :root:where(:not([data-theme="light"])) .hy-tip, :root:where(:not([data-theme="light"])) .mo-legend {
    --hy-TRY: #3987e5; --hy-MXN: #d95926; --hy-ZAR: #199e70; --hy-AUD: #c98500; --hy-USD: #d55181; --hy-EUR: #008300;
  }
}
:root[data-theme="dark"] .hy-chart, :root[data-theme="dark"] .hy-tip, :root[data-theme="dark"] .mo-legend {
  --hy-TRY: #3987e5; --hy-MXN: #d95926; --hy-ZAR: #199e70; --hy-AUD: #c98500; --hy-USD: #d55181; --hy-EUR: #008300;
}

/* 入力 */
.hy-custom .field { margin-bottom: 10px; }
.hy-ym { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 8px; }
html[data-ui="v2"] .hy-ym select.bad { border-color: var(--s2, #B4442C); border-width: 2px; }
.hy-group { margin: 6px 0 4px; padding-top: 10px; border-top: 1px dashed var(--line); }
.hy-gh { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 0 4px; }
.hy-hint { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 0 0 8px; }
.hy-swaps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
@media (max-width: 420px) { .hy-swaps { grid-template-columns: 1fr; } }
html[data-ui="v2"] .input-unit .unit.hy-tag { min-width: 0; font-weight: 700; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }

/* 注意 */
.hy-caution { margin: 0 0 12px; padding: 8px 12px; border-left: 4px solid var(--tint-warn-ink, #8A4B00); background: var(--tint-warn, var(--accent-soft)); font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.6; }
.callout li.hy-warn { color: var(--ink); }

/* 結果の小さな数字（6つ）が長い文でも崩れないように */
html[data-ui="v2"] #result .res-hero .big b, html[data-ui="v2"] #result .res-hero .sub { overflow-wrap: anywhere; }
html[data-ui="v2"] #result .res-hero .big b { font-size: clamp(26px, 7.5vw, 40px); }
#result .res-mini .v.bad { color: var(--tint-warn-ink, #8A4B00); }

/* 表 */
table.data.hy-tbl { font-size: 13.5px; }
table.data.hy-tbl th:first-child, table.data.hy-tbl td:first-child { text-align: left; }
#tbl1 td:first-child, #tbl2 td:first-child { white-space: normal; min-width: 4.5em; max-width: 6.5em; }
table.data.hy-tbl td.bad, .hy-bad { color: var(--tint-warn-ink, #8A4B00); font-weight: 700; }
table.data.hy-tbl caption { text-align: left; font-weight: 700; font-size: 14px; color: var(--ink); padding: 0 0 6px; }
#tbl1, #tbl2 { margin-top: 16px; }
@media (max-width: 560px) { table.data.hy-tbl th, table.data.hy-tbl td { padding-left: 6px; padding-right: 6px; } }
#formula .fl { overflow-wrap: anywhere; }

/* 図 */
.hy-chart { position: relative; }
.mo-chart .hy-ln { fill: none; stroke-width: 2; stroke-linejoin: round; }
.mo-chart .hy-ln.ref { stroke-width: 1.5; stroke-dasharray: 5 3; }
.mo-chart .hy-base { stroke: var(--ink-2); stroke-opacity: .5; }
.mo-chart .hy-lab { fill: var(--ink-2); font-size: 11px; }
.mo-chart .hy-cross { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.mo-chart .hy-hit { fill: transparent; cursor: crosshair; touch-action: pan-y; }
.hy-ln.hy-TRY { stroke: var(--hy-TRY); } .hy-ln.hy-MXN { stroke: var(--hy-MXN); } .hy-ln.hy-ZAR { stroke: var(--hy-ZAR); }
.hy-ln.hy-AUD { stroke: var(--hy-AUD); } .hy-ln.hy-USD { stroke: var(--hy-USD); } .hy-ln.hy-EUR { stroke: var(--hy-EUR); }
.hy-dot.hy-TRY { fill: var(--hy-TRY); } .hy-dot.hy-MXN { fill: var(--hy-MXN); } .hy-dot.hy-ZAR { fill: var(--hy-ZAR); }
.hy-dot.hy-AUD { fill: var(--hy-AUD); } .hy-dot.hy-USD { fill: var(--hy-USD); } .hy-dot.hy-EUR { fill: var(--hy-EUR); }
.mo-legend i.hy-TRY, .hy-tip i.hy-TRY { border-top-color: var(--hy-TRY); } .mo-legend i.hy-MXN, .hy-tip i.hy-MXN { border-top-color: var(--hy-MXN); }
.mo-legend i.hy-ZAR, .hy-tip i.hy-ZAR { border-top-color: var(--hy-ZAR); } .mo-legend i.hy-AUD, .hy-tip i.hy-AUD { border-top-color: var(--hy-AUD); }
.mo-legend i.hy-USD, .hy-tip i.hy-USD { border-top-color: var(--hy-USD); } .mo-legend i.hy-EUR, .hy-tip i.hy-EUR { border-top-color: var(--hy-EUR); }
.mo-legend i.ref, .hy-tip i.ref { border-top-style: dashed; }
.hy-tip { position: absolute; z-index: 2; min-width: 168px; padding: 8px 10px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); font-size: 12px; line-height: 1.6; pointer-events: none; font-variant-numeric: tabular-nums; }
.hy-tip[hidden] { display: none; }
.hy-tip b { display: block; margin-bottom: 2px; }
.hy-tip span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.hy-tip i { display: inline-block; width: 14px; height: 0; border-top: 2.5px solid; }

/* 表の見出しは折り返してよい（列の幅を数字に合わせる） */
table.data.hy-tbl th { white-space: normal; }
table.data.hy-tbl th.n { min-width: 4.5em; }
table.data.hy-tbl caption { overflow-wrap: anywhere; }
