/* Character window (ui/character.js): status page with portrait, bars, the four points beside the values they raise
   (like the original characterwindow.py) and tiles for the further values; skill page with grade colours. */

/* ---------- head ---------- */
.cw-head { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.cw-face { position: relative; width: 32px; height: 32px; flex: none; overflow: hidden; background: #0f0c0a;
  box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--bronze); }
.cw-face img { display: block; width: 32px; height: 32px; }
.cw-lv { position: absolute; left: 0; bottom: 0; min-width: 14px; height: 9px; line-height: 9px; padding: 0 2px; font-size: 7px;
  text-align: center; color: #fff; background: #2a1f16; box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--gold-d); }
.cw-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 7px; line-height: 9px; white-space: nowrap; }
.cw-name { font-size: 10px; line-height: 11px; color: var(--gold); overflow: hidden; text-overflow: ellipsis; text-shadow: 1px 1px 0 var(--ink); }

/* ---------- experience / TP / MP ---------- */
.cw-bars { display: flex; flex-direction: column; gap: 3px; margin-bottom: 5px; }
.cw-bar { display: flex; align-items: center; gap: 3px; }
.cw-bl { width: 14px; flex: none; font-size: 6px; line-height: 8px; color: var(--dim); }
.cw-bar .bar { flex: 1; height: 8px; }
.cw-bar .bar .bt { line-height: 8px; }

/* ---------- sections ---------- */
.cw-sec { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; margin: 5px 0 3px; padding: 0 2px 1px;
  font-size: 8px; line-height: 10px; color: var(--gold); border-bottom: 1px solid #3a2e22; box-shadow: 0 1px 0 #0a0807; white-space: nowrap; }
.cw-pts { font-size: 7px; color: var(--dim); }
.cw-pts.on { color: var(--green); }
#character .gs-box { margin-bottom: 0; }

/* ---------- status points: label, value box, +, the value they raise ---------- */
.cw-stats { display: flex; flex-direction: column; gap: 2px; }
.cw-st { display: grid; grid-template-columns: 16px 22px 10px minmax(0, 1fr); column-gap: 3px; align-items: center; height: 12px; font-size: 7px; }
.cw-k { color: var(--gold); padding-left: 1px; }
.cw-v { height: 12px; line-height: 12px; text-align: center; color: #fff; background: #0f0c0a;
  box-shadow: inset 0 0 0 1px #2e261d, inset 1px 1px 0 1px var(--edge); }
.cw-v.green { color: var(--green); }
.cw-v.red { color: #ff7a6a; }
.cw-st .plus { margin: 0; }
.cw-nop { width: 10px; height: 10px; }
.cw-d { display: flex; justify-content: space-between; gap: 4px; min-width: 0; height: 12px; line-height: 12px; padding: 0 3px;
  white-space: nowrap; background: #120e0b; box-shadow: inset 0 0 0 1px #2e251c; }
.cw-d > span:last-child { color: #fff; }

/* ---------- further values: tiles of two ---------- */
.cw-ext { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.cw-tile { display: flex; flex-direction: column; min-width: 0; padding: 2px 3px 1px; background: #120e0b; box-shadow: inset 0 0 0 1px #2e251c; }
.cw-tile .k { font-size: 6px; line-height: 7px; color: var(--dim); white-space: nowrap; }
.cw-tile .v { font-size: 8px; line-height: 9px; color: #fff; text-align: right; white-space: nowrap; }

/* ---------- skills ---------- */
.cw-skills { display: flex; flex-direction: column; gap: 2px; }
.cw-sk { display: flex; align-items: center; gap: 4px; padding: 1px 3px 1px 1px; background: #120e0b; box-shadow: inset 0 0 0 1px #2e251c; }
.cw-sk:hover { box-shadow: inset 0 0 0 1px var(--bronze); }
.cw-sk.off .slot img.ic { opacity: .45; filter: grayscale(1); }
.cw-sk-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cw-sk-name { font-size: 8px; line-height: 9px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-sk.off .cw-sk-name { color: var(--dim); }
.cw-sk-bar { height: 3px; margin-right: 2px; background: var(--ink); box-shadow: 0 0 0 1px #2e251c; }
.cw-sk-bar i { display: block; height: 100%; }
.cw-sk-lv { width: 16px; flex: none; text-align: center; font-size: 8px; line-height: 9px; text-shadow: var(--ol); }
.cw-sk .plus { margin: 0; }
/* grades: normal, master (M), grand master (G), perfect (P), not learnt (-1) */
.cw-sk-lv.g-1 { color: var(--dim); }
.cw-sk-lv.g0 { color: #fff; }
.cw-sk-bar.g0 i { background: #d8c8a0; }
.cw-sk-lv.g1 { color: var(--gold); }
.cw-sk-bar.g1 i { background: var(--gold); }
.cw-sk-lv.g2 { color: #ff8a4a; }
.cw-sk-bar.g2 i { background: #ff8a4a; }
.cw-sk-lv.g3 { color: #c890ff; }
.cw-sk-bar.g3 i { background: #c890ff; }
.cw-book { display: flex; justify-content: space-between; gap: 4px; margin-top: 4px; height: 12px; line-height: 12px; padding: 0 3px;
  font-size: 7px; white-space: nowrap; background: #120e0b; box-shadow: inset 0 0 0 1px #2e251c; }
.cw-help { margin-top: 4px; text-align: center; line-height: 8px; }
.cw-note { padding: 3px 4px 4px; font-size: 7px; line-height: 9px; color: var(--dim); background: #120e0b; box-shadow: inset 0 0 0 1px #2e251c; }
.cw-note .eq-btns { margin-top: 4px; }
