/* Window "Titel" (ui/titlewin.js): categories left, the titles of the category right, a row folds open for details */
#titles .win-body { padding: 4px; }
.tw-wrap { display: flex; gap: 4px; height: 196px; }
/* header bars like the original's: dark, bronze frame, gold text */
.tw-h { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 4px; height: 11px; padding: 0 4px;
  background: linear-gradient(#3b2f23, #2a2119); box-shadow: inset 0 1px 0 #5e4a33, inset 0 0 0 1px #4a3b2b;
  font-size: 8px; line-height: 11px; color: var(--gold); white-space: nowrap; }
.tw-cnt { flex: none; font-size: 7px; color: var(--text); text-shadow: var(--ol); }

/* ---------- left: categories and the emblem over the head ---------- */
.tw-side { flex: none; width: 82px; display: flex; flex-direction: column; gap: 3px; min-height: 0; }
.tw-cats { flex: none; padding: 1px; background: #120e0b; box-shadow: inset 0 0 0 1px #2e251c; }
.tw-cat { display: flex; align-items: center; gap: 3px; min-height: 17px; padding: 0 3px 0 2px; margin-top: 1px; cursor: pointer;
  background: linear-gradient(#211a14, #18130f); box-shadow: inset 0 0 0 1px #2e251c; }
.tw-cat:first-child { margin-top: 0; }
.tw-cat:hover { background: linear-gradient(#2c231a, #201913); }
.tw-cat.picked { background: linear-gradient(#3d3022, #2c2318); box-shadow: inset 0 0 0 1px var(--bronze), inset 2px 0 0 var(--gold); }
.tw-cat img { flex: none; width: 13px; height: 13px; object-fit: contain; image-rendering: pixelated; }
.tw-cn { flex: 1; min-width: 0; font-size: 8px; line-height: 8px; color: var(--text); overflow-wrap: anywhere; }
.tw-cat.picked .tw-cn { color: var(--gold); }
.tw-cc { flex: none; font-size: 7px; line-height: 8px; color: var(--dim); }
.tw-show { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 3px 2px;
  background: radial-gradient(ellipse at 50% 55%, #2a2016, #120e0b 70%); box-shadow: inset 0 0 0 1px #2e251c; overflow: hidden; }
.tw-sl { font-size: 7px; line-height: 8px; }
.tw-sn { max-width: 100%; font-size: 8px; line-height: 9px; text-align: center; overflow-wrap: anywhere; }
.tw-none { height: 30px; font-size: 12px; line-height: 30px; }

/* ---------- right: the titles ---------- */
.tw-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; min-height: 0; }
.tw-list { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 1px 3px 1px 1px; background: #120e0b; box-shadow: inset 0 0 0 1px #2e251c; }
.tw-empty { font-size: 7px; line-height: 8px; text-align: center; padding: 14px 6px; }
.tw-row { display: flex; align-items: center; gap: 4px; min-height: 24px; padding: 2px 3px 2px 2px; margin-top: 1px; cursor: pointer;
  background: linear-gradient(#1f1813, #16110d); box-shadow: inset 0 0 0 1px #2e251c; }
.tw-row:first-child { margin-top: 0; }
.tw-row:hover { background: linear-gradient(#2a2119, #1d1711); }
.tw-row.on { box-shadow: inset 0 0 0 1px rgba(120, 214, 90, .45); }
.tw-row.open { background: linear-gradient(#2e2419, #211a13); box-shadow: inset 0 0 0 1px var(--bronze); }
/* the emblem in a dark slot; titles not held yet are grey */
.tw-em { flex: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 22px; background: #0c0907;
  box-shadow: inset 0 0 0 1px #2e261d, inset 1px 1px 0 1px var(--edge); overflow: hidden; }
.tw-cv { display: block; }
.tw-row.locked .tw-cv, .tw-det.locked .tw-cv { filter: grayscale(1) brightness(.7); }
.tw-mid { flex: 1; min-width: 0; }
/* name and line wrap rather than being cut (the longer languages need two lines) */
.tw-nm, .tw-sub { overflow-wrap: anywhere; }
.tw-nm { font-size: 9px; line-height: 10px; }
.tw-sub { font-size: 7px; line-height: 8px; }
.tw-row.locked .tw-nm { opacity: .75; }
/* state: a lock on the titles not held, a tick on the one over the head */
.tw-st { flex: none; width: 12px; height: 12px; }
.tw-st.lock { background: var(--ic-lock) center / 12px 12px no-repeat; opacity: .85; }
.tw-st.tick { background: var(--ic-tick) center / 12px 12px no-repeat; }
.tw-arr { position: relative; flex: none; width: 9px; height: 9px; background: #0f0c0a; box-shadow: inset 0 0 0 1px var(--bronze-d); }
.tw-arr::after { content: ''; position: absolute; left: 2px; top: 3px; border-left: 2.5px solid transparent; border-right: 2.5px solid transparent;
  border-top: 3px solid var(--bronze-l); }
.tw-row:hover .tw-arr { box-shadow: inset 0 0 0 1px var(--bronze-l); }
.tw-row.open .tw-arr::after { top: 2px; border-top: 0; border-bottom: 3px solid var(--gold); }

/* folded open */
.tw-det { padding: 3px 5px 5px; margin: 0 0 1px; background: #1a140f; box-shadow: inset 0 0 0 1px var(--bronze), inset 0 -1px 0 1px #2e251c; }
.tw-dem { display: flex; justify-content: center; margin: 1px 0 3px; padding: 1px 0;
  background: radial-gradient(ellipse at 50% 55%, #2c2117, #120e0b 75%); box-shadow: inset 0 0 0 1px #2e251c; }
.tw-desc { font-size: 8px; line-height: 9px; }
.tw-dh { margin-top: 3px; font-size: 7px; line-height: 8px; color: var(--gold); }
.tw-bl { font-size: 8px; line-height: 9px; }
.tw-btns { margin-top: 4px; }

.tw-foot { margin-top: 3px; font-size: 7px; line-height: 8px; text-align: center; }

/* the line "Titel" of the character window opens this window */
.cw-title { cursor: pointer; }
