/* Commander screen (client/panels-commander.js): level card, skills, talent tabs and the talent tree. */
.cm-gold { color: #ffd23a; } .cm-good { color: #8fe09a; }
.cm-h { margin: 14px 2px 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* level and XP */
.cm-head { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; border-radius: 14px;
  background: radial-gradient(120% 90% at 0% 0%, rgba(240,180,60,.22), transparent 60%), linear-gradient(#26332b, #18221c); border: 1px solid #5a4a22; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.cm-badge { width: 76px; height: 76px; display: grid; place-content: center; justify-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe08a, var(--c-amber-lo) 55%, #6b4310);
  border: 3px solid #ffe6aa; box-shadow: 0 0 0 3px var(--c-ink), 0 4px 10px rgba(0,0,0,.5); color: #2a1a04; }
.cm-badge small { font: 800 9px/1 system-ui; letter-spacing: .12em; }
.cm-badge b { font: 900 30px/1 system-ui; }
.cm-headtx { min-width: 0; display: grid; gap: 5px; }
.cm-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 800; font-size: 16px; padding-right: 52px; }
.cm-xp { position: relative; height: 20px; border-radius: 10px; background: var(--c-ink); border: 1px solid var(--line); overflow: hidden; }
.cm-xp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2f8f6a, #8fe09a); transition: width .4s; }
.cm-xp b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 11.5px/1 system-ui; text-shadow: 0 1px 2px #000; }
.cm-next { font-size: 12px; color: var(--muted); line-height: 1.3; }
.cm-info { position: absolute; top: 8px; right: 8px; min-height: 30px; padding: 3px 9px; font-size: 12px; font-weight: 700; border-radius: 999px; background: rgba(0,0,0,.4); border-color: #5a4a22; color: var(--pn-gold, var(--c-amber)); }

.cm-claim { width: 100%; margin-top: 8px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 14px;
  background: linear-gradient(#5a3f0c, #3a2a0a); border: 1px solid var(--c-amber); box-shadow: 0 0 14px rgba(240,180,60,.35); animation: cm-glow 1.8s ease-in-out infinite; }
.cm-claim .ic { font-size: 30px; } .cm-claim .tx { display: grid; gap: 2px; min-width: 0; }
.cm-claim .tx b { color: var(--c-amber-pale); } .cm-claim .tx small { font-size: 12px; color: #e6d6b0; }
.cm-claim .go { padding: 7px 12px; border-radius: 10px; background: var(--accent); color: var(--c-amber-ink); font-weight: 800; }
@keyframes cm-glow { 50% { box-shadow: 0 0 22px rgba(240,180,60,.6); } }

/* skills */
.cm-skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cm-skill { display: grid; justify-items: center; gap: 3px; padding: 10px 4px 8px; border-radius: 12px; background: linear-gradient(#24332a, #18221c); min-width: 0; }
.cm-skill .ic { width: 46px; height: 46px; display: grid; place-items: center; font-size: 24px; border-radius: 12px; background: var(--c-ink); border: 2px solid #3d5244; }
.cm-skill b { font-size: 12.5px; text-align: center; line-height: 1.15; }
.cm-skill small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.cm-skill.ready .ic { border-color: #8fe09a; box-shadow: 0 0 10px rgba(94,196,107,.5); } .cm-skill.ready small { color: #8fe09a; font-weight: 700; }
.cm-skill.active .ic { border-color: #ffd23a; box-shadow: 0 0 10px rgba(255,210,58,.55); } .cm-skill.active small { color: #ffd23a; }
.cm-skill.locked .ic { filter: grayscale(1) brightness(.6); } .cm-skill.locked b { opacity: .65; }

/* talent points, reset and branch tabs */
.cm-points { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: #131b16; border: 1px solid var(--line); }
.cm-points b { font-size: 20px; font-weight: 900; } .cm-points small { display: block; font-size: 11.5px; color: var(--muted); }
.cm-reset { display: grid; justify-items: center; min-height: 44px; padding: 4px 12px; font-weight: 700; font-size: 13px; }
.cm-reset small { font-size: 11px; color: var(--muted); display: block; }
.cm-reset:disabled { opacity: .45; }
.cm-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.cm-tabs button { display: grid; justify-items: center; gap: 1px; min-height: 48px; padding: 5px 2px; border-radius: 12px 12px 0 0; border-bottom: 3px solid transparent; background: #18221c; font-weight: 700; font-size: 13px; white-space: nowrap; }
.cm-tabs button small { font-size: 11px; color: var(--muted); font-weight: 600; }
.cm-tabs button.on { background: color-mix(in srgb, var(--c) 22%, #18221c); border-color: var(--c); border-bottom-color: var(--c); }
.cm-tabs button.on small { color: #fff; }

/* the tree */
.cm-branch { padding: 8px 6px 4px; border: 1px solid color-mix(in srgb, var(--c) 55%, var(--c-panel)); border-top: 0; border-radius: 0 0 14px 14px;
  background: radial-gradient(90% 40% at 50% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 75%), #10171a; }
.cm-bdesc { text-align: center; font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.cm-tree { position: relative; width: 100%; max-width: 360px; margin: 0 auto; }
.cm-svg { position: absolute; inset: 0; pointer-events: none; }
.cm-svg svg { display: block; }
.cm-node { position: absolute; transform: translate(-50%, -32px); width: 104px; padding: 0; border: 0; background: none; display: grid; justify-items: center; gap: 2px; color: #fff; }
.cm-orb { position: relative; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #34424f, #1a232c 70%); border: 3px solid #46586a; box-shadow: 0 3px 8px rgba(0,0,0,.5); }
.cm-orb .ic { font-size: 28px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.4)); }
.cm-orb .lock { position: absolute; right: -6px; bottom: -4px; font-size: 15px; }
.cm-node b { font: 900 12.5px/1 system-ui; padding: 2px 8px; border-radius: 999px; background: #0b0f14; border: 1px solid #3a4a5c; margin-top: -9px; position: relative; }
.cm-node small { font: 700 11px/1.1 system-ui; color: #c7d0d9; text-align: center; max-width: 104px; }
.cm-node.on .cm-orb { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 75%, #fff), color-mix(in srgb, var(--c) 55%, #000) 75%); border-color: color-mix(in srgb, var(--c) 70%, #fff); }
.cm-node.on b { border-color: var(--c); }
.cm-node.ready .cm-orb { border-color: #fff; animation: cm-pulse 1.5s ease-in-out infinite; }
.cm-node.ready b { background: var(--c); color: #0b0f14; border-color: #fff; }
.cm-node.max .cm-orb { border-color: #ffd23a; box-shadow: 0 0 12px rgba(255,210,58,.55); }
.cm-node.max b { color: #ffd23a; border-color: #7a5f1f; }
.cm-node.locked .cm-orb { filter: grayscale(1) brightness(.6); } .cm-node.locked small, .cm-node.locked b { opacity: .6; }
@keyframes cm-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 45%, transparent), 0 0 16px var(--c); } }

/* totals and the talent sheet */
.cm-totals { margin-top: 12px; } .cm-totals h3 { margin: 0 2px 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cm-fx { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-fx span { font-size: 12.5px; padding: 4px 9px; border-radius: 999px; background: #131b16; border: 1px solid var(--line); }
.cm-fx b { color: #8fe09a; }
.cm-pips { display: flex; gap: 5px; margin: 8px 0; }
.cm-pips i { flex: 1; height: 9px; border-radius: 5px; background: var(--c-ink); border: 1px solid var(--line); }
.cm-pips i.on { background: var(--c); border-color: color-mix(in srgb, var(--c) 60%, #fff); }
.cm-xpv { font-size: 12.5px; text-align: right; }
.pf2-cmdlv { font-weight: 700; color: var(--c-amber-pale); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .cm-claim, .cm-node.ready .cm-orb { animation: none; } }
