/* 株の税金・損益通算・繰越・損出し（money/capital-gains-tax.html）だけの見た目。色は変数だけを使う */

.cg-label { display: block; font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.cg-hint { margin: 0 0 10px; font-size: 12.5px; line-height: 1.7; color: var(--muted); }

/* 口座の行 */
.cg-row { position: relative; margin: 0 0 12px; padding: 12px 14px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); min-width: 0; }
.cg-row legend { padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--accent); }
.cg-sub { display: block; margin: 8px 0 4px; font-size: 13px; color: var(--ink-2); }
.cg-sub .hint { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.cg-row 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); }
.cg-row select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.cg-gain { display: grid; grid-template-columns: 6em 1fr; gap: 8px; min-width: 0; }
.cg-gain > * { min-width: 0; }
.cg-row .input-unit { min-width: 0; }
.cg-row .input-unit input { min-width: 0; width: 100%; }
.cg-inc { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13.5px; color: var(--ink); }
.cg-inc[hidden], .cg-w[hidden], .cg-del[hidden], .cg-add[hidden] { display: none; }
.cg-w { margin: 8px 0 0; font-size: 13px; }
.cg-w summary { cursor: pointer; color: var(--accent); font-size: 12.5px; }
.cg-w .cg-hint { margin: 6px 0; }
.cg-del { position: absolute; top: 4px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.cg-del:hover { background: var(--accent-soft); color: var(--ink); }
.cg-rowmsg { margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: var(--ink-2); }
.cg-rowmsg:empty { display: none; }
.cg-add { display: block; width: 100%; margin: 0 0 10px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: transparent; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; }
.cg-add:hover { background: var(--accent-soft); }
@media (max-width: 560px) { .cg-row select { font-size: 16px; } }

/* 結果 */
.cg-msg { margin: 10px 0 0; }
.cg-msg p { font-size: 13.5px !important; line-height: 1.8; }
.cg-h3 { margin: 22px 0 8px; font-size: 15px; color: var(--ink); }
table.data tbody.cg-sum tr:first-child td { border-top: 2px solid var(--line-strong); }
#harvestBox { margin-top: 18px; }
#harvestBox .field { margin-top: 10px; }
