.ct-edit { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ct-edit-btn {
  width: 24px; height: 24px;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--lab-edge-soft);
  border-radius: 7px; color: var(--lab-gold-dim); cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.ct-edit-btn [data-lucide] { width: 13px; height: 13px; }
.ct-edit-btn:hover { border-color: var(--lab-gold); color: var(--lab-gold); }

.ct-establish { padding: 30px 10px; text-align: center; }
.ct-establish-btn { display: flex; justify-content: center; margin-top: 8px; }

.ct-house {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--lab-edge);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(244, 207, 139, 0.06), rgba(15, 8, 19, 0.55));
}
.ct-house-crest { flex: 0 0 auto; width: 64px; height: 76px; display: grid; place-items: center; filter: drop-shadow(0 4px 9px rgba(0, 0, 0, 0.55)); }
.ct-house-crest svg { width: 100%; height: 100%; display: block; }
.ct-house-id { min-width: 0; flex: 1 1 auto; }
.ct-house-name { font-size: 1.4rem; font-weight: 800; color: var(--lab-gold-bright); }
.ct-house-motto { margin-top: 4px; font-size: 0.86rem; font-style: italic; color: var(--lab-gold-dim); }
.ct-house-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.ct-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--lab-edge-soft); background: rgba(0, 0, 0, 0.22); }
.ct-chip-k { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-chip-v { font-size: 0.84rem; font-weight: 700; color: var(--lab-gold-bright); font-variant-numeric: tabular-nums; }

.ct-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; align-items: start; }
.ct-titled-h { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lab-gold-dim); margin-bottom: 7px; }
.ct-char {
  padding: 14px 16px;
  border: 1px solid var(--lab-edge-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(40, 24, 47, 0.5), rgba(15, 8, 19, 0.55));
  height: 100%;
}
.ct-char.is-ruler { border-color: var(--lab-edge); background: linear-gradient(180deg, rgba(244, 207, 139, 0.1), rgba(15, 8, 19, 0.55)); }
.ct-char-name { font-size: 1.06rem; font-weight: 700; color: var(--lab-gold-bright); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ct-char-sub { margin-top: 4px; font-size: 0.78rem; color: var(--lab-gold-dim); }
.ct-legit { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.ct-legit-lbl { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-legit-v { font-size: 0.86rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ct-legit-v.is-good { color: var(--lab-good); }
.ct-legit-v.is-warn { color: var(--lab-warn); }
.ct-legit-v.is-bad { color: var(--lab-bad); }

.ct-skills { display: flex; gap: 6px; margin-top: 11px; }
.ct-skill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--lab-edge-soft); }
.ct-skill-k { font-size: 0.62rem; font-weight: 700; color: var(--lab-gold-dim); }
.ct-skill-v { font-size: 0.82rem; font-weight: 700; color: var(--lab-gold-bright); font-variant-numeric: tabular-nums; }
.ct-traits { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.ct-trait { font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--lab-edge-soft); color: var(--lab-gold); background: rgba(244, 207, 139, 0.06); }

.ct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 26px 0 20px; }
.ct-page > .lab-hc { margin: 16px 0; }

.ct-tipwrap { position: relative; display: inline-flex; }
.ct-tip {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  padding: 5px 10px;
  background: linear-gradient(180deg, #2a1830, #160b1b);
  border: 1px solid var(--lab-edge);
  border-radius: 8px;
  color: var(--lab-gold-bright);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55);
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 6;
}
.ct-tip::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #160b1b; }
.ct-tipwrap:hover .ct-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.ct-note { font-size: 0.8rem; color: var(--lab-gold-dim); font-style: italic; }

.ct-tree { overflow-x: auto; padding: 10px 4px 6px; }
.ct-tree > ul + ul { margin-top: 18px; }
.ct-kin-unit { display: inline-flex; align-items: stretch; vertical-align: top; margin: 2px 0; }
.ct-mem-ref { display: flex; flex-direction: column; justify-content: center; border-style: dashed; opacity: 0.9; }
.ct-mem-refnote { margin-top: 3px; font-size: 0.7rem; font-style: italic; color: var(--lab-gold-dim); }
.ct-mem-badge.is-foreign { color: #8fbfe0; border-color: rgba(143, 191, 224, 0.45); background: rgba(143, 191, 224, 0.09); }
.ct-mar-foreign { color: #8fbfe0; font-size: 0.9em; font-style: italic; }
.ct-tree ul { position: relative; padding: 26px 0 0; margin: 0; list-style: none; text-align: center; white-space: nowrap; }
.ct-tree li { display: inline-block; vertical-align: top; list-style: none; position: relative; padding: 26px 10px 0; }
.ct-tree li::before, .ct-tree li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 26px; border-top: 2px solid var(--lab-edge); }
.ct-tree li::after { right: auto; left: 50%; border-left: 2px solid var(--lab-edge); }
.ct-tree li:only-child::before, .ct-tree li:only-child::after { display: none; }
.ct-tree li:only-child { padding-top: 0; }
.ct-tree li:first-child::before, .ct-tree li:last-child::after { border: 0 none; }
.ct-tree li:last-child::before { border-right: 2px solid var(--lab-edge); border-radius: 0 6px 0 0; }
.ct-tree li:first-child::after { border-radius: 6px 0 0 0; }
.ct-tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; width: 0; height: 26px; border-left: 2px solid var(--lab-edge); }
.ct-tree li.ct-kin-branch::before, .ct-tree li.ct-kin-branch::after { border-top-color: var(--lab-edge-soft); }
.ct-tree li.ct-kin-branch::after { border-left-color: var(--lab-edge-soft); }
.ct-kin-leaves { white-space: normal; }
.ct-kin-wrap { display: inline-block; padding: 12px 14px 14px; border: 1px dashed var(--lab-edge-soft); border-radius: 14px; background: rgba(40, 24, 47, 0.28); }
.ct-kin-h { margin-bottom: 10px; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lab-gold-dim); text-align: left; }
.ct-kin-units { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; max-width: 900px; }
.ct-node { display: inline-block; }
.ct-union { display: inline-flex; align-items: stretch; vertical-align: top; }
.ct-union-link { display: flex; align-items: center; justify-content: center; padding: 0 0.55rem; color: var(--lab-gold); }
.ct-rings { width: 30px; height: 18px; background: transparent; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.ct-mem { width: 184px; text-align: left; white-space: normal; padding: 11px 13px; border: 1px solid var(--lab-edge-soft); border-radius: 12px; background: linear-gradient(180deg, rgba(40, 24, 47, 0.5), rgba(15, 8, 19, 0.55)); }
.ct-mem.is-dead { opacity: 0.5; }
.ct-mem.is-ruler { border-color: var(--lab-edge); box-shadow: 0 0 12px rgba(244, 207, 139, 0.18); }
.ct-mem.is-newborn { border-color: var(--lab-good); }
.ct-mem.is-bastard { border-style: dashed; }
.ct-mem-rel { font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-mem-name { font-size: 1rem; font-weight: 700; color: var(--lab-gold-bright); margin: 2px 0; }
.ct-mem-sub { font-size: 0.74rem; color: var(--lab-gold-dim); }
.ct-mem-skl { margin-top: 6px; font-size: 0.74rem; color: var(--lab-gold); font-variant-numeric: tabular-nums; }
.ct-mem-traits { margin-top: 5px; font-size: 0.72rem; color: var(--lab-gold-dim); }
.ct-mem-loy { margin-top: 6px; font-size: 0.74rem; }
.ct-mem-loy.is-good { color: var(--lab-good); }
.ct-mem-loy.is-warn { color: var(--lab-warn); }
.ct-mem-loy.is-bad { color: var(--lab-bad); }
.ct-tree-other-h { margin: 18px 0 9px; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-tree-other { display: flex; flex-wrap: wrap; gap: 10px; }
.ct-tree-other .ct-mem { width: 200px; }

.ct-composer {
  padding: 15px 16px; margin-bottom: 16px;
  border: 1px solid var(--lab-edge); border-radius: 14px;
  background: linear-gradient(180deg, rgba(40, 24, 47, 0.6), rgba(15, 8, 19, 0.6));
}
.ct-composer-t { font-size: 0.9rem; font-weight: 700; color: var(--lab-gold-bright); margin-bottom: 8px; }
.ct-composer-foot { display: flex; gap: 8px; margin-top: 12px; }

.ct-council-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 13px; }
.ct-council { padding: 15px 16px; border: 1px solid var(--lab-edge-soft); border-radius: 14px; background: linear-gradient(180deg, rgba(40, 24, 47, 0.5), rgba(15, 8, 19, 0.55)); display: flex; flex-direction: column; }
.ct-council-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ct-council-t { font-size: 1rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-council-blurb { margin-top: 6px; font-size: 0.8rem; color: var(--lab-gold-dim); line-height: 1.4; }
.ct-council-holder { margin-top: 11px; }
.ct-council-house { font-size: 0.9rem; font-weight: 600; color: var(--lab-gold); }
.ct-council-stats { margin-top: 3px; font-size: 0.78rem; color: var(--lab-gold-dim); font-variant-numeric: tabular-nums; }
.ct-council-warn { margin-top: 6px; font-size: 0.76rem; color: var(--lab-bad); }
.ct-council-vacant { margin-top: 11px; font-size: 0.82rem; color: var(--lab-gold-dim); font-style: italic; }
.ct-council-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; flex-wrap: wrap; }
.ct-council-foot .lab-select { flex: 1 1 auto; min-width: 120px; }

.ct-noble-list { display: flex; flex-direction: column; gap: 12px; }
.ct-noble { padding: 15px 17px; border: 1px solid var(--lab-edge-soft); border-radius: 14px; background: linear-gradient(180deg, rgba(40, 24, 47, 0.5), rgba(15, 8, 19, 0.55)); }
.ct-noble-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ct-noble-id { min-width: 0; flex: 1 1 auto; }
.ct-noble-name { font-size: 1.06rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-noble-lord { margin-top: 2px; font-size: 0.8rem; color: var(--lab-gold-dim); }
.ct-noble-chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ct-noble-favor { font-size: 0.8rem; font-weight: 700; flex: 0 0 auto; }
.ct-noble-favor.is-good { color: var(--lab-good); }
.ct-noble-favor.is-bad { color: var(--lab-bad); }
.ct-amb, .ct-mood, .ct-tag { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--lab-edge-soft); }
.ct-tag { color: var(--lab-gold-dim); }
.ct-tag-premier { color: var(--lab-warn); border-color: rgba(236, 188, 91, 0.4); }
.ct-tag-kin { color: #c9a0e0; border-color: rgba(201, 160, 224, 0.4); }
.ct-tag-expecting { color: #7fd6a8; border-color: rgba(127, 214, 168, 0.45); }
/* Real-time pregnancy countdown chips + bastard badges */
.ct-preg-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--lab-edge-soft); color: var(--lab-gold); margin-left: 6px; }
.ct-preg-chip b { color: var(--lab-gold-bright); font-variant-numeric: tabular-nums; }
.ct-preg-chip.is-good { color: #7fd6a8; border-color: rgba(127, 214, 168, 0.4); }
.ct-preg-chip.is-cooldown { color: var(--lab-gold-dim); }
.ct-preg-warn { color: var(--lab-bad); font-weight: 700; }
.ct-preg-note { color: var(--lab-warn); }
.ct-mem-preg { margin-top: 5px; }
.ct-mem-badge { display: inline-block; margin-top: 5px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--lab-edge-soft); }
.ct-mem-badge.is-bastard { color: var(--lab-warn); border-color: rgba(236, 188, 91, 0.4); }
.ct-mem-badge.is-legit { color: #7fd6a8; border-color: rgba(127, 214, 168, 0.4); }
.ct-amb.amb-loyal { color: var(--lab-good); border-color: rgba(121, 211, 155, 0.4); }
.ct-amb.amb-calm { color: var(--lab-gold-dim); }
.ct-amb.amb-warn { color: var(--lab-warn); border-color: rgba(236, 188, 91, 0.4); }
.ct-amb.amb-danger { color: var(--lab-bad); border-color: rgba(229, 115, 115, 0.4); }
.ct-mood.mood-good { color: var(--lab-good); }
.ct-mood.mood-calm { color: var(--lab-gold-dim); }
.ct-mood.mood-warn { color: var(--lab-warn); }
.ct-mood.mood-bad { color: var(--lab-bad); }
.ct-loy { display: flex; align-items: center; gap: 9px; margin: 12px 0 4px; }
.ct-loy-lbl { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-loy-track { flex: 1 1 auto; height: 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--lab-edge-soft); overflow: hidden; }
.ct-loy-fill { display: block; height: 100%; }
.ct-loy-fill.is-good { background: linear-gradient(90deg, #4f9e6f, var(--lab-good)); }
.ct-loy-fill.is-warn { background: linear-gradient(90deg, #b88a36, var(--lab-warn)); }
.ct-loy-fill.is-bad { background: linear-gradient(90deg, #a04848, var(--lab-bad)); }
.ct-loy-v { font-size: 0.8rem; font-weight: 700; color: var(--lab-gold-bright); font-variant-numeric: tabular-nums; }
.ct-noble-stats { font-size: 0.82rem; color: var(--lab-gold); }
.ct-noble-standing { margin-top: 5px; font-size: 0.78rem; color: var(--lab-gold-dim); }
.ct-noble-standing .trend-up { color: var(--lab-good); }
.ct-noble-standing .trend-down { color: var(--lab-bad); }
.ct-noble-rel { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; font-size: 0.78rem; }
.ct-noble-rel .rel-tag { font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold-dim); margin-right: 5px; }
.ct-noble-rel .rel-rival { color: #e8a0a0; }
.ct-noble-rel .rel-ally { color: #a8d8b0; }
.ct-noble-goal { margin-top: 8px; font-size: 0.8rem; color: var(--lab-gold); background: rgba(244, 207, 139, 0.05); border-left: 2px solid var(--lab-edge); padding: 6px 9px; border-radius: 0 7px 7px 0; }
.ct-noble-goal .goal-tag { font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold-dim); margin-right: 5px; }
.ct-noble-levy { margin-top: 9px; font-size: 0.8rem; color: var(--lab-gold-dim); }
.ct-seats-block { margin-top: 10px; }
.ct-seats-label { font-size: 0.62rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--lab-gold-dim); margin-bottom: 5px; }
.ct-seats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ct-seat { font-size: 0.78rem; padding: 3px 9px; border-radius: 8px; border: 1px solid var(--lab-edge-soft); background: rgba(0, 0, 0, 0.22); color: var(--lab-gold); }
.ct-seat-primary { border-color: var(--lab-edge); color: var(--lab-gold-bright); }
.ct-noble-seats { font-size: 0.8rem; color: var(--lab-gold); margin-top: 8px; }
.ct-noble-seats.ct-none { color: var(--lab-gold-dim); font-style: italic; }
.ct-noble-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--lab-edge-soft); }

.ct-cw {
  padding: 14px 16px; margin-bottom: 16px;
  border: 1px solid rgba(229, 115, 115, 0.5);
  background: rgba(229, 115, 115, 0.1);
  border-radius: 13px;
}
.ct-cw-h { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #ff9a9a; }
.ct-cw-b { margin-top: 5px; font-size: 0.88rem; color: var(--lab-gold-bright); }
.ct-cw-bar { height: 9px; margin-top: 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); overflow: hidden; }
.ct-cw-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #a83232, #e06a6a); }
.ct-cw-sub { margin-top: 6px; font-size: 0.78rem; color: var(--lab-gold-dim); }

/* THE ULTIMATUM. Bend or fight, and saying nothing is fighting; it sits with the war banners because
   it is the loudest thing that can happen to a crown short of a war. */
.ct-ult {
  padding: 14px 16px; margin-bottom: 16px;
  border: 1px solid rgba(229, 115, 115, 0.6);
  background: linear-gradient(180deg, rgba(120, 45, 40, 0.24), rgba(229, 115, 115, 0.08));
  border-radius: 13px;
}
.ct-ult-h {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #ff9a9a;
}
.ct-ult-ico { width: 15px; height: 15px; flex: 0 0 auto; color: #ff9a9a; }
.ct-ult-b { margin-top: 6px; font-size: 0.9rem; line-height: 1.5; color: var(--lab-gold-bright); }
.ct-ult-sub { margin-top: 6px; font-size: 0.78rem; color: var(--lab-gold-dim); font-variant-numeric: tabular-nums; }
.ct-ult-cost {
  margin-top: 10px; padding: 9px 12px;
  font-size: 0.82rem; line-height: 1.45; color: var(--lab-gold);
  border-left: 2px solid rgba(229, 115, 115, 0.6);
  border-radius: 0 8px 8px 0;
  background: rgba(0, 0, 0, 0.22);
}
.ct-ult-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* A plot the crown has uncovered, and the two things it can still do about it. */
.ct-plot {
  padding: 15px 17px; margin-bottom: 12px;
  border: 1px solid rgba(236, 188, 91, 0.4);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(40, 24, 47, 0.5), rgba(15, 8, 19, 0.55));
}
.ct-plot.is-demanding { border-color: rgba(229, 115, 115, 0.55); }
.ct-plot-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ct-plot-name { font-size: 1.05rem; font-weight: 800; color: var(--lab-gold-bright); }
.ct-plot-stage {
  padding: 3px 11px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700;
  border: 1px solid var(--lab-edge-soft);
  background: rgba(244, 207, 139, 0.08);
  color: var(--lab-gold);
}
.ct-plot-stage.stage-willing, .ct-plot-stage.stage-demanding {
  color: #f0a5a5; border-color: rgba(229, 115, 115, 0.5); background: rgba(229, 115, 115, 0.12);
}
.ct-plot-meta { margin-top: 5px; font-size: 0.78rem; color: var(--lab-gold-dim); font-variant-numeric: tabular-nums; }
.ct-plot-mems { display: flex; flex-direction: column; gap: 6px; margin-top: 11px; }
.ct-plot-mem {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px;
  border-radius: 9px;
  border-left: 3px solid var(--lab-edge);
  background: rgba(0, 0, 0, 0.2);
}
.ct-plot-mem.is-sworn { border-left-color: #e57373; }
.ct-plot-mem-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ct-plot-mem-name { font-size: 0.88rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-plot-mem-sub { font-size: 0.72rem; color: var(--lab-gold-dim); font-variant-numeric: tabular-nums; }
.ct-plot-mem-acts { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.ct-plot-note { font-size: 0.74rem; color: var(--lab-gold-dim); font-style: italic; }
.ct-plot-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ct-plot-warn { margin-top: 10px; font-size: 0.76rem; font-style: italic; line-height: 1.45; color: var(--lab-gold-dim); }

.ct-fyrd-size { font-size: 0.96rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-fyrd-cities { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 11px; }
.ct-fyrd-lbl { font-size: 0.62rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--lab-gold-dim); margin-right: 4px; }
.ct-fyrd-city { font-size: 0.76rem; padding: 3px 9px; border-radius: 8px; border: 1px solid var(--lab-edge-soft); background: rgba(0, 0, 0, 0.22); color: var(--lab-gold); }
.ct-fyrd-city.is-cap { border-color: var(--lab-edge); color: var(--lab-gold-bright); }
.ct-fyrd-city.is-castle { border-color: rgba(244, 207, 139, 0.3); border-style: dashed; }
.ct-fyrd-men { color: var(--lab-gold-dim); font-size: 0.7rem; }
.ct-seat-castle { border-style: dashed; }
.ct-seat-tier { color: var(--lab-gold-dim); font-size: 0.68rem; }
.ct-fyrd-more { font-size: 0.74rem; color: var(--lab-gold-dim); font-style: italic; }
.ct-fyrd-note { margin-top: 10px; font-size: 0.76rem; color: var(--lab-gold-dim); font-style: italic; line-height: 1.45; }
.ct-fyrd-foot { display: flex; gap: 8px; margin-top: 13px; }
.ct-fyrd-empty { font-size: 0.82rem; color: var(--lab-gold-dim); font-style: italic; line-height: 1.45; }

/* The levy right, seen from the muster: what an overlord takes off the top, and the sworn levies
   this realm's own vassals send in under their own colors. */
.ct-fyrd-owed {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 11px; padding: 8px 11px;
  border: 1px solid var(--lab-edge-soft); border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.78rem; line-height: 1.45; color: var(--lab-gold);
}
.ct-fyrd-owed.is-withheld { border-color: rgba(229, 115, 115, 0.45); background: rgba(120, 45, 40, 0.16); color: #f0a5a5; }
.ct-fyrd-owed-ico { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; color: var(--lab-gold-deep); }
.ct-fyrd-owed.is-withheld .ct-fyrd-owed-ico { color: #f0a5a5; }
.ct-fyrd-cities.is-sworn .ct-fyrd-city { border-color: rgba(244, 207, 139, 0.3); }
.ct-fyrd-city.is-withheld { border-color: rgba(229, 115, 115, 0.45); background: rgba(120, 45, 40, 0.16); color: #f0a5a5; }
.ct-fyrd-city.is-withheld .ct-fyrd-men { color: #f0a5a5; font-style: italic; }

.ct-pet {
  padding: 15px 17px; margin-bottom: 11px;
  border: 1px solid var(--lab-edge-soft); border-radius: 13px;
  background: linear-gradient(180deg, rgba(40, 24, 47, 0.5), rgba(15, 8, 19, 0.55));
}
.ct-pet-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ct-pet-title { font-size: 1rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-pet-house { font-size: 0.78rem; color: var(--lab-gold-dim); }
.ct-pet-body { font-size: 0.88rem; color: var(--lab-gold); line-height: 1.5; margin-bottom: 10px; }
.ct-pet-stake { font-size: 0.8rem; line-height: 1.45; padding: 7px 10px; border-radius: 0 7px 7px 0; margin-bottom: 6px; }
.ct-pet-stake span { font-size: 0.62rem; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 700; margin-right: 5px; }
.ct-pet-stake.grant { background: rgba(121, 211, 155, 0.08); border-left: 2px solid rgba(121, 211, 155, 0.6); }
.ct-pet-stake.grant span { color: var(--lab-good); }
.ct-pet-stake.deny { background: rgba(229, 115, 115, 0.08); border-left: 2px solid rgba(229, 115, 115, 0.55); }
.ct-pet-stake.deny span { color: var(--lab-bad); }
.ct-pet-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }

/* ===== Gender-colored family tree ===== */
.ct-mem.is-male { border-left: 3px solid rgba(95, 150, 224, 0.6); }
.ct-mem.is-female { border-left: 3px solid rgba(226, 132, 182, 0.6); }
.ct-mem.is-dead.is-male { border-left-color: rgba(95, 150, 224, 0.3); }
.ct-mem.is-dead.is-female { border-left-color: rgba(226, 132, 182, 0.3); }
.ct-sex-m { color: #9cc2f2; }
.ct-sex-f { color: #f0a9cf; }

/* ===== Management (naming & titles) ===== */
.ct-cust-grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.ct-cust-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 150px; min-width: 130px; }
.ct-cust-field .gov-text { flex: 0 0 auto; width: 100%; max-width: none; }
.ct-cust-lbl { font-size: 0.58rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-cust-tier { padding: 11px 13px; margin-bottom: 9px; border: 1px solid var(--lab-edge-soft); border-radius: 10px; background: rgba(0, 0, 0, 0.2); }
.ct-cust-rank { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lab-gold); margin-bottom: 8px; }
.ct-cust-foot { display: flex; gap: 8px; margin-top: 13px; }

/* ===== Noble / faction coat of arms ===== */
.ct-coa { flex: 0 0 auto; width: 34px; height: 41px; display: block; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); }
.ct-coa svg { width: 100%; height: 100%; display: block; }
.ct-coa-full { width: 58px; height: 70px; }
.ct-noble-head .ct-coa { margin-top: 1px; }

/* ===== House meta ===== */
.ct-house-meta { margin-top: 8px; font-size: 0.76rem; color: var(--lab-gold-dim); }

/* ===== Ruler/heir pills + legitimacy breakdown ===== */
.ct-char-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ct-char-pill { font-size: 0.68rem; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--lab-edge-soft); color: var(--lab-gold); background: rgba(0, 0, 0, 0.22); }
.ct-char-pill.is-good { color: var(--lab-good); border-color: rgba(121, 211, 155, 0.4); }
.lw { margin-top: 9px; }
.lw summary { cursor: pointer; font-size: 0.78rem; color: var(--lab-gold); list-style: none; }
.lw summary::-webkit-details-marker { display: none; }
.lw summary::before { content: '\25B8'; margin-right: 5px; color: var(--lab-gold-dim); }
.lw[open] summary::before { content: '\25BE'; }
.lw-head { font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold-dim); margin-right: 5px; }
.lw-body { margin-top: 7px; padding: 9px 11px; border: 1px solid var(--lab-edge-soft); border-radius: 9px; background: rgba(0, 0, 0, 0.22); }
.lw-drift { font-size: 0.74rem; color: var(--lab-gold-dim); margin-bottom: 7px; }
.lw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.lw-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 0.76rem; }
.lw-l { color: var(--lab-gold-dim); }
.lw-v { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--lab-gold); }
.lw-v.lw-pos { color: var(--lab-good); }
.lw-v.lw-neg { color: var(--lab-bad); }

/* ===== Council enrichment ===== */
.ct-council.is-vacant { opacity: 0.92; border-style: dashed; }
.ct-council-skill { font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lab-gold-dim); border: 1px solid var(--lab-edge-soft); border-radius: 999px; padding: 2px 8px; }
.ct-council-of { color: var(--lab-gold-dim); font-weight: 400; }
.ct-council-stats { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.ct-council-skillval { font-weight: 700; color: var(--lab-gold-bright); }
.ct-council-bonus { color: var(--lab-good); font-size: 0.78rem; }
.ct-council-bonus.neg { color: var(--lab-bad); }
.ct-council-eff { margin-top: 5px; font-size: 0.76rem; }
.ct-council-eff.eff-good { color: var(--lab-good); }
.ct-council-eff.eff-warn { color: var(--lab-warn); }
.ct-council-eff.eff-bad { color: var(--lab-bad); }
.ct-council-grudge { color: var(--lab-bad); font-style: italic; }

/* ===== Spymaster whispers ===== */
.ct-spy { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--lab-edge-soft); border-radius: 13px; background: linear-gradient(180deg, rgba(40, 24, 47, 0.45), rgba(15, 8, 19, 0.55)); }
.ct-spy.is-none { opacity: 0.8; }
.ct-spy.is-bad { border-color: rgba(229, 115, 115, 0.45); background: rgba(229, 115, 115, 0.07); }
.ct-spy-h { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold); margin-bottom: 6px; }
.ct-spy-headline { font-size: 0.86rem; color: var(--lab-gold-bright); }
.ct-spy-list { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.ct-spy-list li { font-size: 0.8rem; color: var(--lab-gold-dim); }

/* ===== Crown authority + static fields ===== */
.ct-authority { margin-bottom: 12px; }
.ct-authority-top { display: flex; justify-content: space-between; align-items: baseline; }
.ct-authority-lbl { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-authority-v { font-size: 0.84rem; font-weight: 700; color: var(--lab-gold-bright); font-variant-numeric: tabular-nums; }
.ct-authority-bar { height: 9px; margin-top: 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--lab-edge-soft); overflow: hidden; }
.ct-authority-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #c79a45, var(--lab-gold)); }
.ct-authority-note { margin-top: 6px; font-size: 0.74rem; color: var(--lab-gold-dim); line-height: 1.45; }
.ct-static-field { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.ct-static-v { font-size: 0.84rem; color: var(--lab-gold-bright); }

/* ===== Crown lands ===== */
.ct-lands-lbl { font-size: 0.62rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--lab-gold-dim); margin: 10px 0 6px; }
.ct-lands-lbl:first-child { margin-top: 0; }
.ct-lands-count { color: var(--lab-gold); }
.ct-lands-seat { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ct-lands-name { font-size: 0.96rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-lands-tier { font-size: 0.7rem; color: var(--lab-gold-dim); }
.ct-lands-cap { font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lab-warn); border: 1px solid rgba(236, 188, 91, 0.4); border-radius: 999px; padding: 1px 7px; }
.ct-lands-holdings { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-lands-hold { font-size: 0.78rem; padding: 3px 9px; border-radius: 8px; border: 1px solid var(--lab-edge-soft); background: rgba(0, 0, 0, 0.22); color: var(--lab-gold); }
.ct-lands-domain { font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lab-gold-dim); border: 1px solid var(--lab-edge-soft); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.ct-lands-domain.is-over { color: var(--lab-warn); border-color: rgba(236, 188, 91, 0.5); }
.ct-lands-hold.ct-lands-idle { opacity: 0.5; border-style: dashed; }
.ct-lands-idletag { font-size: 0.56rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lab-warn); margin-left: 6px; }
.ct-fyrd-note.ct-lands-warn { color: var(--lab-warn); font-style: normal; }

/* ===== Family tree legend ===== */
.ct-tree-legend { margin-top: 10px; font-size: 0.76rem; color: var(--lab-gold-dim); font-style: italic; }

/* ===== Marriage candidates ===== */
.ct-cand-list { display: flex; flex-direction: column; gap: 8px; }
.ct-cand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--lab-edge-soft); border-radius: 11px; background: rgba(0, 0, 0, 0.22); }
.ct-cand-main { min-width: 0; }
.ct-cand-name { font-size: 0.92rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-cand-warn { font-size: 0.62rem; color: var(--lab-warn); border: 1px solid rgba(236, 188, 91, 0.4); border-radius: 999px; padding: 1px 6px; margin-left: 5px; }
.ct-cand-sub { margin-top: 2px; font-size: 0.76rem; color: var(--lab-gold-dim); }
.ct-cand-skills { margin-top: 3px; font-size: 0.74rem; color: var(--lab-gold); font-variant-numeric: tabular-nums; }

/* ===== Mobilization + side panels ===== */
.ct-muster { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--lab-edge-soft); border-radius: 11px; background: rgba(0, 0, 0, 0.22); }
.ct-muster-h { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-muster-v { font-size: 0.82rem; color: var(--lab-gold); }
.ct-muster-drain { color: var(--lab-bad); }
.ct-muster-quiet { font-size: 0.82rem; color: var(--lab-gold-dim); font-style: italic; }
.ct-side { padding: 13px 15px; margin: 12px 0; border: 1px solid var(--lab-edge-soft); border-radius: 12px; background: linear-gradient(180deg, rgba(40, 24, 47, 0.4), rgba(15, 8, 19, 0.5)); }
.ct-side-h { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold); margin-bottom: 8px; }
.ct-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ct-side-list li { font-size: 0.8rem; color: var(--lab-gold-dim); line-height: 1.45; }
.ct-whisper { padding-left: 11px; border-left: 2px solid var(--lab-edge-soft); }
.ct-whisper-good { border-left-color: rgba(121, 211, 155, 0.6); }
.ct-whisper-warn { border-left-color: rgba(236, 188, 91, 0.6); }
.ct-whisper-bad { border-left-color: rgba(229, 115, 115, 0.6); }
.ct-affairs .ct-affair-turn { color: var(--lab-gold); font-weight: 700; margin-right: 6px; font-variant-numeric: tabular-nums; }

/* ===== Faction member head ===== */
.ct-fac-mem-head { display: flex; align-items: flex-start; gap: 9px; }
.ct-fac-mem-head .ct-coa { width: 34px; height: 41px; }

/* ===== Estate Mood strip ===== */
.ct-estate { margin: 4px 0 14px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--lab-edge-soft); background: rgba(0, 0, 0, 0.24); }
.ct-estate.is-warn { border-color: rgba(207, 138, 42, 0.5); }
.ct-estate.is-danger { border-color: rgba(178, 40, 44, 0.65); background: rgba(70, 12, 14, 0.34); }
.ct-estate-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ct-estate-h { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-estate-nums { font-size: 0.8rem; font-variant-numeric: tabular-nums; color: var(--lab-gold-dim); }
.ct-estate-bar { position: relative; height: 11px; border-radius: 999px; overflow: hidden; background: linear-gradient(90deg, rgba(78, 150, 78, 0.55) 0%, rgba(210, 150, 52, 0.5) 55%, rgba(192, 46, 50, 0.6) 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.ct-estate-fill { height: 100%; min-width: 2px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.12)); border-right: 2px solid var(--lab-gold-bright); box-shadow: 0 0 6px rgba(255, 214, 138, 0.4); transition: width 0.4s ease; }
.ct-estate-notch { position: absolute; top: -3px; width: 2px; height: 17px; background: #f4f4f5; opacity: 0.92; transform: translateX(-1px); box-shadow: 0 0 4px rgba(0, 0, 0, 0.6); }
.ct-estate-cap { margin-top: 8px; font-size: 0.82rem; color: var(--lab-gold-dim); font-style: italic; }
.ct-estate.is-danger .ct-estate-cap { color: #eab0b0; }

/* ===== Defiance banner ===== */
.ct-defiance { margin-top: 12px; padding: 11px 13px; border-radius: 11px; border: 1px solid rgba(178, 40, 44, 0.7); background: rgba(74, 12, 14, 0.4); }
.ct-defiance-h { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: #f0b4b4; font-weight: 800; }
.ct-defiance-b { margin-top: 6px; font-size: 0.86rem; color: #e6c9c9; font-style: italic; }
.ct-defiance-acts { display: flex; gap: 9px; margin-top: 11px; }
.ct-btn-danger { border-color: rgba(178, 40, 44, 0.75) !important; color: #f4b4b4 !important; background: rgba(120, 22, 24, 0.4) !important; }
.ct-btn-danger:hover { background: rgba(160, 30, 32, 0.6) !important; }
.ct-mgr-warn { margin: 4px 0 8px; padding: 7px 10px; border-radius: 8px; font-size: 0.8rem; color: #eec98f; background: rgba(120, 78, 20, 0.22); border: 1px solid rgba(207, 138, 42, 0.4); }
.ct-grudge-k { color: #d98a86 !important; }
.ct-threat-tag { font-weight: 700; }
.ct-threat-2 { color: #eec98f; border-color: rgba(207, 138, 42, 0.5); }
.ct-threat-3 { color: #f0b48a; border-color: rgba(207, 100, 42, 0.6); background: rgba(120, 60, 20, 0.28); }
.ct-threat-4 { color: #f4b4b4; border-color: rgba(178, 40, 44, 0.7); background: rgba(120, 22, 24, 0.34); }

/* ===== Noble card (readability rework) ===== */
.ct-noble-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 11px; border-bottom: 1px solid var(--lab-edge-soft); }
.ct-noble-favor { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: 0 0 auto; text-align: right; }
.ct-favor-k { font-size: 0.56rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-favor-v { font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ct-noble-favor.is-good .ct-favor-v { color: var(--lab-good); }
.ct-noble-favor.is-bad .ct-favor-v { color: var(--lab-bad); }
.ct-tag-faction { color: #c9a0e0; border-color: rgba(201, 160, 224, 0.4); }
.ct-noble-loyrow { margin-top: 4px; }
.ct-noble-loyrow .ct-loy { margin: 9px 0 2px; }
.ct-noble-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.ct-pill { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 10px; border-radius: 8px; border: 1px solid var(--lab-edge-soft); background: rgba(0, 0, 0, 0.22); }
.ct-pill-k { font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-pill-v { font-size: 0.82rem; font-weight: 700; color: var(--lab-gold-bright); font-variant-numeric: tabular-nums; }
.ct-pill-v .trend-up { color: var(--lab-good); }
.ct-pill-v .trend-down { color: var(--lab-bad); }
.ct-noble-insights { margin-top: 11px; display: flex; flex-direction: column; gap: 6px; }
.ct-noble-row { display: flex; gap: 9px; font-size: 0.8rem; line-height: 1.4; align-items: baseline; }
.ct-row-k { flex: 0 0 84px; font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold-dim); padding-top: 1px; }
.ct-row-v { flex: 1 1 auto; min-width: 0; color: var(--lab-gold); }
.ct-row-sub { color: var(--lab-gold-dim); font-size: 0.76rem; }
.ct-row-k.rel-rival-k { color: #e8a0a0; }
.ct-row-k.rel-ally-k { color: #a8d8b0; }
.ct-noble-lands { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--lab-edge-soft); display: flex; flex-direction: column; gap: 6px; }
.ct-mustered { color: var(--lab-warn); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== Noble management ===== */
.ct-noble-manage { margin-top: 12px; padding: 13px 14px; border: 1px solid var(--lab-edge); border-radius: 12px; background: rgba(0, 0, 0, 0.28); animation: lab-fade 0.18s ease; }
.ct-mgr { display: flex; flex-direction: column; gap: 11px; }
.ct-mgr-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ct-mgr-lbl { flex: 0 0 70px; font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-mgr-warn { font-size: 0.74rem; color: var(--lab-warn); font-style: italic; margin-left: 78px; }
.ct-mgr-act .lab-select { min-width: 130px; }
.ct-mgr-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 0.76rem; color: var(--lab-gold-dim); cursor: pointer; }
.ct-service .ct-svc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; margin-top: 8px; border-radius: 10px; background: rgba(0, 0, 0, 0.22); border-left: 3px solid var(--lab-gold); }
.ct-svc-main { flex: 1 1 260px; min-width: 0; }
.ct-svc-t { font-size: 0.86rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-svc-note { font-size: 0.78rem; color: var(--lab-gold); font-style: italic; margin-top: 3px; }
.ct-svc-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ct-mgr-to { font-size: 0.74rem; color: var(--lab-gold-dim); }
.ct-mgr-acc { font-size: 0.74rem; font-weight: 700; }

/* Merchant-republic family coffers strip (Court tab) */
.ct-coffers {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 12px 0 4px; padding: 9px 13px;
  border: 1px solid var(--lab-edge-soft); border-radius: 11px;
  background: linear-gradient(180deg, rgba(40, 24, 47, 0.45), rgba(15, 8, 19, 0.5));
}
.ct-coffers-k { font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-coffers-v { font-size: 0.95rem; font-weight: 700; color: var(--lab-gold-bright); margin-right: auto; }
.ct-faith-banner {
  display: flex; align-items: baseline; gap: 12px;
  margin: 0 0 12px; padding: 10px 15px;
  border: 1px solid var(--lab-edge-soft); border-radius: 11px;
  background: linear-gradient(180deg, rgba(40, 24, 47, 0.5), rgba(15, 8, 19, 0.55));
}
.ct-faith-k { font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-faith-v { font-size: 1.15rem; font-weight: 700; color: var(--lab-gold-bright); letter-spacing: 0.02em; }
.ct-mgr-acc.is-good { color: var(--lab-good); }
.ct-mgr-acc.is-warn { color: var(--lab-warn); }
.ct-mgr-acc.is-bad { color: var(--lab-bad); }
.ct-mgr-seats { display: flex; flex-wrap: wrap; gap: 7px; margin-left: 78px; }
.ct-mgr-seat { display: inline-flex; align-items: center; gap: 7px; padding: 3px 5px 3px 10px; border-radius: 8px; border: 1px solid var(--lab-edge-soft); background: rgba(0, 0, 0, 0.25); font-size: 0.78rem; color: var(--lab-gold); }
.ct-mgr-seat.is-primary { border-color: var(--lab-edge); color: var(--lab-gold-bright); }
.ct-mgr-seat .lab-btn { padding: 2px 8px; font-size: 0.66rem; }
.ct-cost { font-size: 0.78rem; color: var(--lab-gold); font-variant-numeric: tabular-nums; }
.ct-cost.is-short { color: var(--lab-bad); }
.ct-cost-plus { color: var(--lab-gold-dim); margin: 0 5px; }

.ct-feast { margin-top: 4px; padding: 12px 13px; border: 1px solid var(--lab-edge-soft); border-radius: 10px; background: rgba(15, 8, 19, 0.5); display: flex; flex-direction: column; gap: 9px; }
.ct-feast-h { font-size: 0.82rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-feast-stock { font-size: 0.74rem; color: var(--lab-gold-dim); font-variant-numeric: tabular-nums; }
.ct-feast-tier { padding: 9px 11px; border: 1px solid var(--lab-edge-soft); border-radius: 9px; background: rgba(0, 0, 0, 0.22); display: flex; flex-direction: column; gap: 5px; }
.ct-feast-tier.is-dim { opacity: 0.55; }
.ct-feast-tier-top { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; }
.ct-feast-name { font-size: 0.9rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-feast-eff { font-size: 0.74rem; color: var(--lab-good); }
.ct-feast-desc { font-size: 0.76rem; color: var(--lab-gold-dim); line-height: 1.4; }
.ct-feast-cost { font-size: 0.76rem; }
.ct-feast-tier .lab-btn { align-self: flex-start; }

/* ===== Pretender ===== */
.ct-cw-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ct-cw-march { margin-top: 8px; font-size: 0.78rem; color: var(--lab-gold-dim); font-style: italic; }

/* ===== Factions ===== */
.ct-fac { padding: 15px 17px; margin-bottom: 12px; border: 1px solid var(--lab-edge-soft); border-radius: 14px; background: linear-gradient(180deg, rgba(40, 24, 47, 0.5), rgba(15, 8, 19, 0.55)); }
.ct-fac-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ct-fac-name { font-size: 1.1rem; font-weight: 800; color: var(--lab-gold-bright); }
.ct-fac-meta { margin-top: 4px; font-size: 0.78rem; color: var(--lab-gold-dim); }
.ct-fac-goal { margin-top: 10px; font-size: 0.82rem; color: var(--lab-gold); line-height: 1.45; padding: 8px 11px; border-left: 2px solid var(--lab-edge); border-radius: 0 8px 8px 0; background: rgba(244, 207, 139, 0.05); }
.ct-fac-goal.goal-bad { border-left-color: rgba(229, 115, 115, 0.6); background: rgba(229, 115, 115, 0.07); }
.ct-fac-goal.goal-warn { border-left-color: rgba(236, 188, 91, 0.6); background: rgba(236, 188, 91, 0.06); }
.ct-fac-goal-k { font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold-dim); margin-right: 6px; }
.ct-fac-rival { margin-top: 8px; font-size: 0.78rem; color: #e8a0a0; }
.ct-fac-rival-k { font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold-dim); margin-right: 5px; }
.ct-fac-members { margin-top: 11px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ct-fac-mem { padding: 9px 11px; border: 1px solid var(--lab-edge-soft); border-radius: 10px; background: rgba(0, 0, 0, 0.22); }
.ct-fac-mem-id { display: flex; flex-direction: column; gap: 1px; }
.ct-fac-house { font-size: 0.84rem; font-weight: 700; color: var(--lab-gold); }
.ct-fac-leads { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lab-warn); border: 1px solid rgba(236, 188, 91, 0.4); border-radius: 999px; padding: 1px 6px; margin-left: 4px; }
.ct-fac-lord { font-size: 0.74rem; color: var(--lab-gold-dim); }
.ct-fac-mem-st { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 7px; font-size: 0.74rem; color: var(--lab-gold-dim); font-variant-numeric: tabular-nums; }
.ct-fac-levy::before { content: '\2694\FE0F'; margin-right: 3px; }
.ct-fac-banner { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--lab-edge-soft); font-size: 0.8rem; color: var(--lab-gold-dim); line-height: 1.45; }
.ct-fac-banner-k { font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold-dim); margin-right: 6px; }
.ct-fac-banner strong { color: var(--lab-gold-bright); }

/* ===== Intrigue ===== */
.ct-intro { font-size: 0.82rem; color: var(--lab-gold-dim); line-height: 1.5; margin-bottom: 11px; }
.ct-spymaster { font-size: 0.84rem; color: var(--lab-gold); margin-bottom: 14px; }
.ct-spymaster strong { color: var(--lab-gold-bright); }
.ct-threat { padding: 13px 15px; margin-bottom: 14px; border: 1px solid rgba(229, 115, 115, 0.45); border-radius: 12px; background: rgba(229, 115, 115, 0.07); }
.ct-threat-h { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #ff9a9a; margin-bottom: 7px; }
.ct-threat-sub { font-size: 0.78rem; color: var(--lab-gold-dim); line-height: 1.45; margin-bottom: 10px; }
.ct-threat-line { font-size: 0.82rem; color: #e8a0a0; margin-bottom: 4px; }
.ct-plot { padding: 12px 14px; margin-bottom: 9px; border: 1px solid var(--lab-edge-soft); border-radius: 11px; background: rgba(0, 0, 0, 0.22); }
.ct-plot.is-threat { border-color: rgba(229, 115, 115, 0.4); }
.ct-plot-top { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; flex-wrap: wrap; }
.ct-plot-title { font-size: 0.92rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-plot-tgt { font-size: 0.78rem; color: var(--lab-gold-dim); }
.ct-plot-body { margin-top: 6px; font-size: 0.8rem; color: var(--lab-gold); line-height: 1.45; }
.ct-plot-foot { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.ct-plot-launch { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.ct-plot-launch .lab-select { min-width: 200px; }
.ct-plot-desc { margin-top: 9px; font-size: 0.78rem; color: var(--lab-gold-dim); font-style: italic; line-height: 1.45; }

/* ===== Marriages ===== */
.ct-mar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 11px 4px; border-bottom: 1px solid var(--lab-edge-soft); }
.ct-mar-row:last-child { border-bottom: 0; }
.ct-mar-id { min-width: 168px; display: flex; flex-direction: column; }
.ct-mar-name { font-size: 0.98rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-mar-rel { font-size: 0.72rem; color: var(--lab-gold-dim); }
.ct-mar-spouses { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; }
.ct-mar-unwed { font-size: 0.78rem; color: var(--lab-gold-dim); font-style: italic; }
.ct-mar-sp { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; color: var(--lab-gold); padding: 2px 9px; border-radius: 999px; border: 1px solid var(--lab-edge-soft); background: rgba(244, 207, 139, 0.06); }
.ct-mar-sp.is-dead { opacity: 0.55; color: var(--lab-gold-dim); border-style: dashed; }
.ct-mar-sp.is-incest { border-color: rgba(236, 188, 91, 0.45); }
.ct-mar-rank { font-size: 0.6rem; font-weight: 800; color: var(--lab-gold-dim); background: rgba(0, 0, 0, 0.3); border-radius: 5px; padding: 0 4px; }
.ct-mar-acts { display: flex; flex-wrap: wrap; gap: 7px; margin-left: auto; }
.ct-mar-preview { margin: 12px 0; display: flex; flex-wrap: wrap; gap: 7px; min-height: 26px; align-items: center; }
.ct-mar-tag { font-size: 0.76rem; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--lab-edge-soft); color: var(--lab-gold); background: rgba(0, 0, 0, 0.22); }
.ct-mar-tag.is-warn { color: var(--lab-warn); border-color: rgba(236, 188, 91, 0.42); }
.ct-mar-tag.is-ok { color: var(--lab-good); border-color: rgba(120, 200, 140, 0.35); }
.ct-mar-bad { color: var(--lab-bad); font-style: normal; }
/* Polygamy-aware tree cards */
.ct-mem.is-secondary-spouse { border-style: dashed; }
.ct-mem-mini { width: 156px; padding: 9px 11px; }
.ct-mem-badge.is-rank { border-color: var(--lab-edge-soft); color: var(--lab-gold-dim); }
.ct-mem-badge.is-incest { border-color: rgba(236, 188, 91, 0.5); color: var(--lab-warn); }
.ct-union-link.is-dead { opacity: 0.45; }
.ct-mar-check { display: flex; align-items: flex-start; gap: 8px; font-size: 0.8rem; color: var(--lab-gold-dim); line-height: 1.4; cursor: pointer; }
.ct-mar-check input { margin-top: 3px; flex: 0 0 auto; }
.ct-mar-splbl { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lab-gold-dim); align-self: center; margin-right: 2px; }
.ct-mar-ring { display: inline-flex; width: 20px; height: 12px; color: var(--lab-gold); opacity: 0.75; }
.ct-mar-ring svg { width: 100%; height: 100%; }
.ct-mar-sp { align-items: center; }
.ct-mem-name { display: flex; align-items: center; gap: 6px; }
.ct-mem-rename { margin-left: auto; padding: 1px 5px; background: transparent; border: 1px solid var(--lab-edge-soft); border-radius: 6px; color: var(--lab-gold-dim); cursor: pointer; line-height: 0; flex: 0 0 auto; }
.ct-mem-rename:hover { border-color: var(--lab-gold); color: var(--lab-gold); }
.ct-mem-rename svg, .ct-mem-rename i { width: 12px; height: 12px; display: block; }
.ct-mar-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; margin-top: 1px; flex: 0 0 auto;
  border: 1px solid var(--lab-edge); border-radius: 5px;
  background: rgba(0, 0, 0, 0.32); cursor: pointer; position: relative;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.ct-mar-check input[type="checkbox"]:hover { border-color: var(--lab-gold-dim); }
.ct-mar-check input[type="checkbox"]:checked { border-color: var(--lab-gold); background: linear-gradient(180deg, rgba(244, 207, 139, 0.28), rgba(244, 207, 139, 0.08)); }
.ct-mar-check input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid var(--lab-gold-bright); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.ct-mem.is-departed { opacity: 0.78; border-style: dashed; }
.ct-mem-badge.is-marriedout { color: var(--lab-gold); border-color: rgba(244, 207, 139, 0.4); background: rgba(244, 207, 139, 0.06); }

/* ===== Intrigue expansion: protection, launcher preview, royal authority ===== */
.ct-prot { display: flex; flex-direction: column; gap: 7px; }
.ct-prot-line { font-size: 0.82rem; color: var(--lab-gold-dim); line-height: 1.45; }
.ct-prot-line.is-good { color: var(--lab-good); }
.ct-plot-preview { margin-top: 9px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.ct-plot-preview .ct-note { flex-basis: 100%; }
.ct-authority { margin-top: 11px; }
.ct-authority:empty { display: none; }
.ct-authority-h { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--lab-gold); margin-bottom: 7px; }
.lab-select optgroup { background: #1a0d1f; color: var(--lab-gold); font-style: normal; }

/* ===== Intrigue target browser ===== */
.ct-brow { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 2px; }
.ct-brow-ctrls { display: flex; gap: 10px; flex-wrap: wrap; }
.ct-brow-search {
  flex: 1 1 240px; min-width: 0; padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--lab-edge-soft); border-radius: 10px;
  color: var(--lab-gold-bright); font-size: 0.86rem; font-family: inherit;
  transition: border-color 0.15s ease;
}
.ct-brow-search::placeholder { color: var(--lab-gold-dim); }
.ct-brow-search:focus { outline: none; border-color: var(--lab-gold); }
.ct-brow-sort { flex: 0 0 auto; }
.ct-brow-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ct-brow-chip {
  padding: 6px 13px; border-radius: 999px; cursor: pointer;
  background: rgba(0, 0, 0, 0.24); border: 1px solid var(--lab-edge-soft);
  color: var(--lab-gold-dim); font-size: 0.76rem; font-weight: 600; font-family: inherit;
  transition: all 0.14s ease;
}
.ct-brow-chip:hover { color: var(--lab-gold); border-color: var(--lab-gold-dim); }
.ct-brow-chip.is-on { color: var(--lab-ink); background: var(--lab-gold); border-color: var(--lab-gold); }
.ct-brow-count { font-size: 0.72rem; color: var(--lab-gold-dim); letter-spacing: 0.03em; }
.ct-brow-list {
  max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px;
  border: 1px solid var(--lab-edge-soft); border-radius: 12px; padding: 7px; background: rgba(0, 0, 0, 0.18);
}
/* Never let rows/cards shrink to fit the box; scroll the list instead. A card with
   overflow:hidden otherwise gets flex min-height:0 and collapses to a thin line. */
.ct-brow-list > * { flex: 0 0 auto; }
.ct-brow-grp {
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--lab-gold-dim); padding: 9px 6px 2px;
}
.ct-brow-empty { padding: 22px 12px; text-align: center; color: var(--lab-gold-dim); font-style: italic; }
.ct-tgt-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent; transition: background 0.12s ease, border-color 0.12s ease;
}
.ct-tgt-row:hover { background: rgba(244, 207, 139, 0.06); }
.ct-tgt-row.is-sel { background: rgba(244, 207, 139, 0.13); border-color: var(--lab-gold); }
.ct-tgt-row.is-whole { border-style: dashed; border-color: var(--lab-edge-soft); }
.ct-tgt-row.is-whole .ct-tgt-name { color: var(--lab-gold); }

/* Accordion house/realm cards */
.ct-hcard {
  border: 1px solid var(--lab-edge-soft); border-radius: 11px; overflow: hidden;
  background: rgba(0, 0, 0, 0.22); transition: border-color 0.14s ease;
}
.ct-hcard.is-open { border-color: var(--lab-edge); background: rgba(0, 0, 0, 0.3); }
.ct-hcard.has-sel { border-color: var(--lab-gold); }
.ct-hcard-head { display: flex; align-items: center; gap: 11px; padding: 11px 13px; cursor: pointer; transition: background 0.12s ease; }
.ct-hcard-head:hover { background: rgba(244, 207, 139, 0.05); }
.ct-hcard-chev { flex: 0 0 auto; color: var(--lab-gold-dim); font-size: 0.7rem; transform: rotate(-90deg); transition: transform 0.16s ease; }
.ct-hcard.is-open .ct-hcard-chev { transform: rotate(0deg); color: var(--lab-gold); }
.ct-hcard-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ct-hcard-name { font-weight: 700; color: var(--lab-gold-bright); font-size: 0.9rem; }
.ct-hcard-sub { font-size: 0.7rem; color: var(--lab-gold-dim); }
.ct-hcard-body { padding: 3px 8px 9px 30px; display: flex; flex-direction: column; gap: 3px; border-top: 1px solid var(--lab-edge-soft); }
.ct-hcard-none { font-size: 0.74rem; color: var(--lab-gold-dim); font-style: italic; padding: 8px 4px; }
.ct-tgt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ct-tgt-name { font-weight: 600; color: var(--lab-gold-bright); font-size: 0.88rem; }
.ct-tgt-sub { font-size: 0.72rem; color: var(--lab-gold-dim); line-height: 1.3; }
.ct-tgt-tags { display: flex; flex-wrap: wrap; gap: 5px; flex: 0 0 auto; justify-content: flex-end; }
.ct-tgt-tag { font-size: 0.66rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--lab-edge-soft); color: var(--lab-gold-dim); white-space: nowrap; }
.ct-tgt-tag.is-war { color: #ff9a9a; border-color: rgba(229, 115, 115, 0.45); }
.ct-tgt-tag.is-sanction { color: var(--lab-warn); border-color: rgba(236, 188, 91, 0.42); }
.ct-tgt-tag.is-foothold { color: var(--lab-good); border-color: rgba(120, 200, 140, 0.4); }
.ct-tgt-tag.is-warn { color: var(--lab-warn); border-color: rgba(236, 188, 91, 0.42); }
.ct-brow-action:empty { display: none; }
.ct-brow-action { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--lab-edge-soft); }
.ct-brow-mark { font-size: 0.86rem; color: var(--lab-gold-bright); margin-bottom: 11px; }
.ct-brow-mark strong { color: var(--lab-gold-bright); }
.ct-brow-mark-l { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lab-gold-dim); margin-right: 6px; }
.ct-cb { padding: 13px 15px; margin-bottom: 14px; border: 1px solid rgba(244, 207, 139, 0.4); border-radius: 12px; background: rgba(244, 207, 139, 0.05); }
.ct-cb-h { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold-bright); margin-bottom: 7px; }
.ct-cb-line { font-size: 0.82rem; color: var(--lab-gold); margin-bottom: 4px; line-height: 1.45; }
.ct-cb-line strong { color: var(--lab-gold-bright); }

.ct-estate-act { margin-top: 8px; display: flex; justify-content: flex-end; }
.ct-fac-foot { margin-top: 10px; display: flex; justify-content: flex-end; }

.ct-regency { border: 1px solid var(--lab-edge); border-left: 3px solid var(--lab-gold); background: var(--lab-glass-a); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.ct-regency-h { font-weight: 600; color: var(--lab-gold-bright); margin-bottom: 4px; }
.ct-regency-b { font-size: 13px; color: var(--lab-ink); opacity: 0.92; }
.ct-regency-foot { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.ct-agenda-danger { color: #e8a0a0; }
.ct-agenda-warn { color: #e8c98f; }
.ct-agenda-calm { color: var(--lab-gold); }
.ct-agenda-danger .ct-row-sub, .ct-agenda-warn .ct-row-sub, .ct-agenda-calm .ct-row-sub { opacity: 0.82; }
.ct-coin-good { color: #cde8a0; }
.ct-coin-bad { color: #e8a0a0; }

/* Relics / Artifacts tab */
.ct-relic-actions { margin: 0 0 12px; }
.ct-relic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ct-relic-card { border: 1px solid rgba(212,175,110,0.35); border-radius: 10px; padding: 12px 14px; background: rgba(20,16,10,0.55); display: flex; flex-direction: column; gap: 6px; }
.ct-relic-martial { border-left: 3px solid #c98b5a; }
.ct-relic-regal { border-left: 3px solid var(--lab-gold-deep, #d4af6e); }
.ct-relic-head { display: flex; align-items: center; gap: 8px; }
.ct-relic-ico { width: 18px; height: 18px; color: var(--lab-gold-deep, #d4af6e); }
.ct-relic-title { font-weight: 700; color: #f0e2c4; }
.ct-relic-sub { font-size: 0.82em; opacity: 0.8; }
.ct-relic-eff { font-size: 0.9em; color: #cde8a0; }
.ct-relic-bearer { font-size: 0.85em; opacity: 0.9; font-style: italic; }
.ct-relic-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.ct-relic-btns .lab-select { max-width: 150px; }
.ct-forge { display: flex; flex-direction: column; gap: 10px; max-width: 540px; }
.ct-field { display: flex; flex-direction: column; gap: 4px; }
.ct-field-lbl { font-size: 0.82em; opacity: 0.85; }
.ct-forge-budget { margin: 4px 0; display: flex; flex-direction: column; gap: 6px; }
.ct-forge-hint { font-size: 0.85em; opacity: 0.8; font-style: italic; }
.ct-forge-bar { font-weight: 700; color: #cde8a0; }
.ct-forge-bar.over { color: #e8a0a0; }
.ct-forge-warn { color: #e8a0a0; font-size: 0.85em; }
.ct-forge-effects { display: flex; flex-direction: column; gap: 6px; }
.ct-forge-eff { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ct-forge-eff-lbl { font-size: 0.9em; }
.ct-forge-eff-inp { max-width: 90px; }
.ct-forge-actions { margin-top: 8px; }
.ct-relic-warn { margin-top: 6px; font-size: 0.78em; color: #e8b06a; font-style: italic; }
.ct-relic-badge { color: #d9b34a; margin-left: 5px; font-size: 0.82em; vertical-align: middle; }
.ct-mem-badge.is-relic { background: rgba(217, 179, 74, 0.16); color: #e8c96a; border-color: rgba(217, 179, 74, 0.5); }

/* Family view: Tree / Roster toggle */
.ct-famtabs { display: inline-flex; gap: 4px; margin: 6px 0 12px; padding: 4px; border: 1px solid var(--lab-edge-soft); border-radius: 12px; background: rgba(0, 0, 0, 0.22); }
.ct-famtab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 15px; border: 0; border-radius: 9px; background: transparent; color: var(--lab-gold-dim); font-weight: 700; font-size: 0.8rem; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.ct-famtab [data-lucide] { width: 14px; height: 14px; }
.ct-famtab.is-active { background: linear-gradient(180deg, rgba(244, 207, 139, 0.16), rgba(244, 207, 139, 0.05)); color: var(--lab-gold-bright); }
.ct-famtab:hover:not(.is-active) { color: var(--lab-gold); }

/* Family roster */
.ct-roster { margin-top: 2px; }
.ct-roster-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ct-roster-search { flex: 1 1 200px; min-width: 150px; padding: 8px 12px; border: 1px solid var(--lab-edge-soft); border-radius: 10px; background: rgba(0, 0, 0, 0.28); color: var(--lab-gold-bright); font-size: 0.85rem; }
.ct-roster-search::placeholder { color: var(--lab-gold-dim); }
.ct-roster-search:focus { outline: none; border-color: var(--lab-gold); }
.ct-roster-list { display: flex; flex-direction: column; gap: 8px; }
.ct-roster-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--lab-edge-soft); border-radius: 12px; background: linear-gradient(180deg, rgba(40, 24, 47, 0.42), rgba(15, 8, 19, 0.5)); }
.ct-roster-row.is-dead { opacity: 0.55; }
.ct-roster-row.is-female { border-left: 2px solid rgba(233, 160, 196, 0.5); }
.ct-roster-row.is-male { border-left: 2px solid rgba(150, 183, 233, 0.5); }
.ct-rr-main { min-width: 0; flex: 1 1 auto; }
.ct-rr-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ct-rr-name { font-size: 1rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-rr-rel { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-rr-sub { margin-top: 3px; font-size: 0.76rem; color: var(--lab-gold-dim); }
.ct-rr-spouses { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ct-rr-tags { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.ct-rr-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: 0 0 auto; max-width: 48%; }

.ct-tag { font-size: 0.66rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--lab-edge-soft); color: var(--lab-gold-dim); background: rgba(0, 0, 0, 0.2); }
.ct-tag.is-legit { color: var(--lab-good); border-color: rgba(126, 214, 143, 0.4); }
.ct-tag.is-bastard { color: var(--lab-warn); border-color: rgba(226, 183, 106, 0.4); border-style: dashed; }
.ct-tag.is-bad { color: var(--lab-bad); border-color: rgba(224, 124, 124, 0.4); }

/* Clickable tree cards */
.ct-mem[data-ct-person] { cursor: pointer; transition: border-color 0.14s ease, box-shadow 0.14s ease; }
.ct-mem[data-ct-person]:hover { border-color: var(--lab-gold); box-shadow: 0 0 12px rgba(244, 207, 139, 0.18); }

/* Person sheet */
@keyframes ct-fade { from { opacity: 0; } to { opacity: 1; } }
.ct-sheet-ov { position: fixed; inset: 0; z-index: 100060; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 4, 10, 0.66); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: ct-fade 0.14s ease; }
.ct-sheet { width: min(440px, 96vw); max-height: 88vh; overflow-y: auto; padding: 18px 20px; border: 1px solid var(--lab-edge); border-radius: 16px; background: linear-gradient(180deg, rgba(40, 24, 47, 0.96), rgba(15, 8, 19, 0.98)); box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6); }
.ct-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ct-sheet-idc { min-width: 0; }
.ct-sheet-rel { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-sheet-name { font-size: 1.3rem; font-weight: 800; color: var(--lab-gold-bright); margin: 2px 0; }
.ct-sheet-sub { font-size: 0.8rem; color: var(--lab-gold-dim); }
/* .ct-sheet-x is styled by the canonical close button in lab_hub.css. */
.ct-sheet-skl { margin-top: 12px; font-size: 0.82rem; color: var(--lab-gold); font-variant-numeric: tabular-nums; }
.ct-sheet-tags, .ct-sheet-spouses { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ct-sheet-traits { margin-top: 10px; font-size: 0.78rem; color: var(--lab-gold-dim); }
.ct-sheet-splbl { margin-top: 15px; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-sheet-preg { margin-top: 10px; }
.ct-sheet-acts { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 820px) {
  .ct-roster-row { flex-direction: column; }
  .ct-rr-acts { max-width: none; justify-content: flex-start; margin-top: 10px; }
}

/* Marriage arranger modal */
.ct-arr-ov { position: fixed; inset: 0; z-index: 100060; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 4, 10, 0.66); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: ct-fade 0.14s ease; }
.ct-arr { width: min(520px, 96vw); max-height: 90vh; display: flex; flex-direction: column; padding: 18px 20px; border: 1px solid var(--lab-edge); border-radius: 16px; background: linear-gradient(180deg, rgba(40, 24, 47, 0.97), rgba(15, 8, 19, 0.98)); box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6); }
.ct-arr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex: 0 0 auto; }
.ct-arr-idc { min-width: 0; }
.ct-arr-rel { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-arr-name { font-size: 1.24rem; font-weight: 800; color: var(--lab-gold-bright); margin: 2px 0; }
.ct-arr-sub { font-size: 0.78rem; color: var(--lab-gold-dim); }
.ct-arr-x { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--lab-edge-soft); border-radius: 8px; background: rgba(0, 0, 0, 0.25); color: var(--lab-gold); cursor: pointer; transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease; }
.ct-arr-x [data-lucide] { width: 15px; height: 15px; }
.ct-arr-x:hover { border-color: var(--lab-bad); color: var(--lab-bad); background: rgba(229, 115, 115, 0.12); }
.ct-arr-anchor { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex: 0 0 auto; }
.ct-arr-flbl { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lab-gold-dim); flex: 0 0 auto; }
.ct-arr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; flex: 0 0 auto; }
.ct-arr-chip { padding: 6px 13px; border: 1px solid var(--lab-edge-soft); border-radius: 999px; background: rgba(0, 0, 0, 0.22); color: var(--lab-gold-dim); font-size: 0.76rem; font-weight: 700; cursor: pointer; transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease; }
.ct-arr-chip:hover { color: var(--lab-gold); border-color: var(--lab-gold); }
.ct-arr-chip.is-active { color: #1b0f22; background: linear-gradient(180deg, var(--lab-gold-bright), var(--lab-gold)); border-color: var(--lab-gold); }
.ct-arr-search { margin-top: 12px; flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--lab-edge-soft); border-radius: 10px; background: rgba(0, 0, 0, 0.28); color: var(--lab-gold-bright); font-size: 0.85rem; }
.ct-arr-search::placeholder { color: var(--lab-gold-dim); }
.ct-arr-search:focus { outline: none; border-color: var(--lab-gold); }
.ct-arr-list { margin-top: 12px; flex: 1 1 auto; overflow-y: auto; min-height: 84px; max-height: 42vh; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; }
.ct-arr-empty { padding: 16px 4px; }
.ct-arr-cand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--lab-edge-soft); border-radius: 10px; background: rgba(0, 0, 0, 0.2); cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease; }
.ct-arr-cand:hover { border-color: var(--lab-gold); }
.ct-arr-cand.is-sel { border-color: var(--lab-gold); background: linear-gradient(180deg, rgba(244, 207, 139, 0.14), rgba(244, 207, 139, 0.04)); }
.ct-arr-cand-main { min-width: 0; }
.ct-arr-cand-name { font-size: 0.92rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-arr-kin { margin-left: 6px; font-size: 0.66rem; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--lab-edge-soft); color: var(--lab-gold-dim); }
.ct-arr-kin.is-close { color: var(--lab-warn); border-color: rgba(226, 183, 106, 0.45); }
.ct-arr-cand-sub { margin-top: 2px; font-size: 0.72rem; color: var(--lab-gold-dim); }
.ct-arr-cand-tick { flex: 0 0 auto; color: var(--lab-gold-bright); }
.ct-arr-cand-tick [data-lucide] { width: 16px; height: 16px; }
.ct-arr-opts { flex: 0 0 auto; }
.ct-arr-opts .gov-field { margin-top: 10px; }
.ct-arr .ct-mar-preview { margin-top: 12px; flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; }
.ct-arr-foot { margin-top: 14px; flex: 0 0 auto; display: flex; justify-content: flex-end; }

/* Harem: per-spouse try-for-a-child picker */
.ct-repro { width: 100%; margin: 4px 0; padding: 12px 14px; border: 1px solid var(--lab-edge-soft); border-radius: 12px; background: linear-gradient(180deg, rgba(40, 24, 47, 0.4), rgba(15, 8, 19, 0.5)); }
.ct-repro-lbl { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lab-gold-dim); margin-bottom: 8px; }
.ct-repro-list { display: flex; flex-direction: column; gap: 8px; }
.ct-repro-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ct-repro-who { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ct-repro-name { font-size: 0.92rem; font-weight: 700; color: var(--lab-gold-bright); }
.ct-repro-rank { font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lab-gold-dim); }
.ct-repro-note { font-size: 0.78rem; color: var(--lab-gold-dim); font-style: italic; }
.ct-repro-note.is-good { color: var(--lab-good); font-style: normal; }
