/* ============================================================
   暗号資産の税金（money/crypto-tax.html）だけの見た目
   色は変数だけを使う（money.css・ek.css の v2 層の上に重ねる）
   ============================================================ */

.ct-help { margin: 6px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
#form select { width: 100%; max-width: 100%; height: 44px; padding: 0 10px; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); }
@media (max-width: 560px) { #form select { font-size: 16px; } }

/* 結果 */
.ct-h3 { margin: 22px 0 8px; font-size: 15px; color: var(--ink); }
.ct-msg { margin: 10px 0 0; }
.ct-msg p { font-size: 13.5px !important; line-height: 1.8; }
#formula .fl { overflow-wrap: anywhere; }
html[data-ui="v2"] #result .res-mini .v.neg { color: var(--s2, #B4442C); }

/* 売買の記録 */
.ct-lots { margin-top: 24px; }
.ct-lead { font-size: 14px; line-height: 1.8; margin: 0 0 14px; }
.ct-open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 560px) { .ct-open { grid-template-columns: 1fr; } }
.ct-head, .ct-row { display: grid; grid-template-columns: 6.6em minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 0.9fr) 36px; gap: 6px; align-items: center; }
.ct-head { font-size: 12px; color: var(--muted); margin: 2px 0 4px; }
.ct-rows { display: grid; gap: 8px; }
.ct-row { padding-bottom: 8px; border-bottom: 1px solid var(--grid); }
.ct-row.sell .ct-k { color: var(--s2, #B4442C); }
.ct-row.bad { outline: 2px solid var(--s2, #B4442C); outline-offset: 2px; border-radius: 4px; }
html[data-ui="v2"] .ct-k, html[data-ui="v2"] .ct-in {
  width: 100%; min-width: 0; height: 44px; padding: 0 8px; font-size: 15px; font-variant-numeric: tabular-nums; box-sizing: border-box;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
}
html[data-ui="v2"] .ct-in { text-align: right; }
html[data-ui="v2"] .ct-k { padding: 0 2px 0 6px; font: inherit; font-size: 14px; }
html[data-ui="v2"] .ct-k:focus, html[data-ui="v2"] .ct-in:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.ct-del {
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.ct-del:hover { background: var(--accent-soft); color: var(--ink); }
.ct-del:focus-visible { outline: 2px solid var(--accent); }
@media (max-width: 560px) { html[data-ui="v2"] .ct-in, html[data-ui="v2"] .ct-k { font-size: 16px; } }
/* 狭い画面：1行目＝種類・数量・消す、2行目＝金額・手数料 */
@media (max-width: 520px) {
  .ct-head { display: none; }
  .ct-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; grid-template-areas: "k q d" "a f f"; gap: 6px; }
  .ct-row .ct-k { grid-area: k; } .ct-row .c-q { grid-area: q; } .ct-row .c-a { grid-area: a; } .ct-row .c-f { grid-area: f; } .ct-row .ct-del { grid-area: d; width: 32px; }
  .ct-cell { position: relative; }
  .ct-cell::before { content: attr(data-k); position: absolute; left: 8px; top: 3px; font-size: 10px; color: var(--muted); pointer-events: none; }
  html[data-ui="v2"] .ct-cell .ct-in { padding-top: 12px; }
}

.ct-row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ct-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 1px solid var(--accent); border-radius: var(--r);
  background: var(--surface); color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.ct-btn:hover { background: var(--accent-soft); }
.ct-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ct-btn.ghost { border-color: var(--line-strong); color: var(--ink-2); font-weight: 500; }

.ct-lots-out { margin-top: 8px; }
.ct-lots-out:empty { display: none; }
.ct-use { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }

/* 本文 */
.article .mo-dates li { grid-template-columns: 10em 1fr; }
@media (max-width: 400px) { .article .mo-dates li { grid-template-columns: 1fr; } }
