/* Card stats v3 (2026-10-17): the trait line, clickable card lines and their explanation pop-up, the card's power block on
   item pages (js/cards.js lnHtml / C.lineInfo / C.itemStats, js/cardsocket.js). Crisp colours only - no soft text halos. */

/* a card line: click for what it does */
.cd-ln { cursor: help; text-decoration: underline dotted rgba(255, 217, 138, 0.45); text-underline-offset: 3px; }
.cd-ln:hover { text-decoration-color: #ffd98a; }
.cd-ln .cd-lv { font-weight: 700; }
.cd-trn { color: #dcbcff; font-weight: 700; }
:root[data-booklight] .bookwin .cd-trn { color: var(--bk-acc); }
:root[data-booklight] .bookwin .cd-ln { text-decoration-color: color-mix(in srgb, var(--bk-acc) 55%, transparent); }

/* the deck summary: the traits working now */
#ui .bookwin .cd-trs { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
#ui .bookwin .cd-trs h5 { margin: 4px 0 2px; font: 700 14px/1.4 'Mali', sans-serif; color: #dcbcff; }
#ui .bookwin .cd-trs h5 small { font-weight: 500; font-size: 12px; color: #b9b1a0; }
#ui .bookwin .cd-trs .cd-ln { display: block; padding: 3px 8px; border-left: 3px solid #b783ff; border-radius: 6px; background: rgba(183, 131, 255, 0.1); font: 500 13px/1.45 'Mali', sans-serif; color: #e9e2cf; }
:root[data-booklight] #ui .bookwin .cd-trs h5 { color: var(--bk-acc); }
:root[data-booklight] #ui .bookwin .cd-trs h5 small { color: var(--bk-ink); }
:root[data-booklight] #ui .bookwin .cd-trs .cd-ln { color: var(--bk-ink); background: color-mix(in srgb, var(--bk-acc) 10%, #fffdf8); border-left-color: var(--bk-acc); }

/* the explanation pop-up */
.cd-lpop { position: fixed; z-index: 100000; max-width: min(340px, 92vw); padding: 10px 30px 10px 12px; border-radius: 12px; background: #1d1a14; border: 2px solid #d9a443; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6); color: #f1ead6; font: 500 13px/1.55 'Mali', sans-serif; }
.cd-lpop b { color: #ffd98a; }
.cd-lpop .cd-trn { color: #dcbcff; }
.cd-lpop .cd-sp { color: #f6d77a; }
.cd-lpop p { margin: 4px 0; }
.cd-lpop small { display: block; color: #c9c0aa; font-size: 12px; }
.cd-lpop small b { color: #8fe08a; }
.cd-lpop .cd-lpt { font-size: 12.5px; color: #e3d8bd; border-top: 1px solid rgba(217, 164, 67, 0.3); padding-top: 4px; }
.cd-lpop .cd-lpx { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(217, 164, 67, 0.8); background: #1c160e; color: #ffd98a; font: 700 13px/1 sans-serif; cursor: pointer; }

/* the card's power on an item page (the info pop-up, the bag's detail) */
.cd-istat { margin: 6px 0 2px; padding: 8px 10px; border-radius: 10px; border: 1.5px solid rgba(217, 164, 67, 0.45); background: rgba(0, 0, 0, 0.22); }
.cd-istat h5 { margin: 0 0 4px; font: 700 14px/1.4 'Mali', sans-serif; color: #ffd98a; }
.cd-istat h5 small { font-weight: 500; font-size: 12px; color: #c9c0aa; }
.cd-istat ul { list-style: none; margin: 0; padding: 0; }
.cd-istat li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed rgba(217, 164, 67, 0.22); font: 500 13px/1.45 'Mali', sans-serif; color: #f1ead6; }
.cd-istat li:last-child { border-bottom: 0; }
.cd-istat li > b { white-space: nowrap; color: #fff3cf; }
.cd-istat li > b small { color: #c9c0aa; font-weight: 500; }
.cd-istat li.cd-itr { display: block; }
.cd-istat li small { color: #c9c0aa; }
.cd-istat .cd-ihint { display: block; margin-top: 4px; font: 500 11.5px/1.4 'Mali', sans-serif; color: #b9b1a0; }
:root[data-booklight] .bookwin .cd-istat { background: color-mix(in srgb, var(--bk-acc) 8%, #fffdf8); border-color: color-mix(in srgb, var(--bk-acc) 45%, transparent); }
:root[data-booklight] .bookwin .cd-istat :is(h5, li, li > b) { color: var(--bk-ink); }
:root[data-booklight] .bookwin .cd-istat :is(h5 small, li small, li > b small, .cd-ihint) { color: color-mix(in srgb, var(--bk-ink) 70%, transparent); }
