/* Cburnett pieces used throughout TJK-Chess. */
.tjk-chess-piece {
  display: block;
  width: 92%;
  height: 92%;
  margin: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.tjk-piece-ghost,
.position-drag-ghost {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 7px 8px rgba(2,8,23,.22));
}

.tjk-piece-ghost .tjk-chess-piece,
.position-drag-ghost .tjk-chess-piece { width: 94%; height: 94%; }

/* Keep the origin piece fully opaque. The ghost provides the drag feedback. */
.is-drag-source > .tjk-chess-piece,
.is-drag-source.tjk-chess-piece { opacity: 1; }

.puzzle-piece,
.live-piece,
.computer-piece,
.study-piece,
.icc-admin-piece,
.icc-course-piece,
.analysis-piece,
.position-piece {
  display: grid;
  place-items: center;
  line-height: 1;
}

.puzzle-piece > .tjk-chess-piece,
.live-piece > .tjk-chess-piece,
.computer-piece > .tjk-chess-piece,
.study-piece > .tjk-chess-piece,
.icc-admin-piece > .tjk-chess-piece,
.icc-course-piece > .tjk-chess-piece,
.analysis-piece > .tjk-chess-piece,
.position-piece > .tjk-chess-piece { width: 92%; height: 92%; }

.tjk-promotion-option > .tjk-chess-piece { width: 72px; height: 72px; }
.site-brand-mark > img { width: 27px; height: 27px; object-fit: contain; }
.home-mini-square .home-mini-piece { width: 92%; height: 92%; }
.position-palette-piece .position-palette-image { width: 90%; height: 90%; }

.puzzle-piece { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.live-piece,
.computer-piece,
.study-piece,
.icc-admin-piece,
.icc-course-piece,
.analysis-piece,
.position-piece { width: 100%; height: 100%; }

.home-quick-icon .tjk-chess-piece { width: 76%; height: 76%; }
.hero-piece .tjk-chess-piece { width: 100%; height: 100%; }
.standalone-course-cover .course-cover-piece { width: 70%; height: 70%; }
.feature-piece-icon { display:inline-block; width:1.35em; height:1.35em; vertical-align:-.34em; object-fit:contain; }

/* v15.1.138 — SAN/PV notation uses the compact legacy Unicode figurines again. */

/* v15.1.137 — Lichess-style move annotations shared by every notation view.
   Keep symbols inline and typographic rather than rendering them as separate chips. */
.tjk-move-annotation{
  display:inline!important;
  min-width:0!important;
  height:auto!important;
  margin-left:.10em!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  font-style:normal!important;
  font-weight:900!important;
  font-size:.96em!important;
  line-height:inherit!important;
  vertical-align:baseline!important;
  letter-spacing:-.02em;
}
.tjk-nag-good,.tjk-nag-only{color:#4da514!important}
.tjk-nag-brilliant{color:#12aeb8!important}
.tjk-nag-interesting{color:#d653a0!important}
.tjk-nag-dubious{color:#3185d8!important}
.tjk-nag-mistake{color:#d98a16!important}
.tjk-nag-blunder{color:#d64545!important}
.tjk-nag-zugzwang,.tjk-nag-equal,.tjk-nag-unclear,.tjk-nag-white-slight,.tjk-nag-black-slight,.tjk-nag-white-better,.tjk-nag-black-better,.tjk-nag-white-winning,.tjk-nag-black-winning,.tjk-nag-novelty,.tjk-nag-development,.tjk-nag-initiative,.tjk-nag-attack,.tjk-nag-counterplay,.tjk-nag-time-trouble,.tjk-nag-compensation,.tjk-nag-idea,.tjk-nag-neutral{color:#718096!important}
.analysis-tree-move.is-current .tjk-move-annotation,
.course-reading-move.is-current .tjk-move-annotation,
.knowledge-tree-move.is-current .tjk-move-annotation{color:#fff!important}
.knowledge-move-symbols{display:inline!important;margin-left:1px!important}
.knowledge-move-symbols em.tjk-move-annotation{background:transparent!important;box-shadow:none!important}
.knowledge-symbol-picker b.tjk-move-annotation{display:inline-flex!important;align-items:center;justify-content:center;font-size:13px!important;margin:0!important}
.study-tree .analysis-tree-move em.study-analysis-nag.tjk-move-annotation{background:transparent!important;box-shadow:none!important}
.icc-admin-position-link strong{display:inline-flex;align-items:center;flex-wrap:wrap;gap:1px}
.icc-admin-nag-chip .tjk-move-annotation{margin-right:2px!important}
html[data-theme="dark"] .tjk-nag-good,html[data-theme="dark"] .tjk-nag-only{color:#70c936!important}
html[data-theme="dark"] .tjk-nag-brilliant{color:#26c6ca!important}
html[data-theme="dark"] .tjk-nag-interesting{color:#ee76bd!important}
html[data-theme="dark"] .tjk-nag-dubious{color:#62a8ef!important}
html[data-theme="dark"] .tjk-nag-mistake{color:#f0a83f!important}
html[data-theme="dark"] .tjk-nag-blunder{color:#ef6868!important}

/* v15.1.137 — Lichess-like annotation colouring: the SAN itself inherits the
   evaluation colour, not only the punctuation glyph. The board-piece image
   intentionally remains the normal current piece artwork. */
:where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-good),
:where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-only){color:#4da514!important}
:where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-brilliant){color:#12aeb8!important}
:where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-interesting){color:#d653a0!important}
:where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-dubious){color:#3185d8!important}
:where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-mistake){color:#d98a16!important}
:where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-blunder){color:#d64545!important}
:where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move).is-current{color:#fff!important}
html[data-theme="dark"] :where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-good),
html[data-theme="dark"] :where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-only){color:#70c936!important}
html[data-theme="dark"] :where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-brilliant){color:#26c6ca!important}
html[data-theme="dark"] :where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-interesting){color:#ee76bd!important}
html[data-theme="dark"] :where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-dubious){color:#62a8ef!important}
html[data-theme="dark"] :where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-mistake){color:#f0a83f!important}
html[data-theme="dark"] :where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move,.knowledge-review-move-row button,.icc-admin-position-link strong):has(.tjk-nag-blunder){color:#ef6868!important}
html[data-theme="dark"] :where(.analysis-tree-move,.course-reading-move,.knowledge-tree-move).is-current{color:#fff!important}

/* Knowledge has older high-specificity colour rules; override them explicitly
   so the Lichess-style evaluation colour survives there as well. */
.knowledge-move-symbols em.tjk-nag-good,.knowledge-move-symbols em.tjk-nag-only{color:#4da514!important}
.knowledge-move-symbols em.tjk-nag-brilliant{color:#12aeb8!important}
.knowledge-move-symbols em.tjk-nag-interesting{color:#d653a0!important}
.knowledge-move-symbols em.tjk-nag-dubious{color:#3185d8!important}
.knowledge-move-symbols em.tjk-nag-mistake{color:#d98a16!important}
.knowledge-move-symbols em.tjk-nag-blunder{color:#d64545!important}
.knowledge-variation-tree .analysis-mainline-cell .analysis-tree-move:has(.tjk-nag-good),
.knowledge-variation-tree .analysis-mainline-cell .analysis-tree-move:has(.tjk-nag-only),
.knowledge-variation-tree .analysis-variation-line .analysis-tree-move:has(.tjk-nag-good),
.knowledge-variation-tree .analysis-variation-line .analysis-tree-move:has(.tjk-nag-only){color:#4da514!important}
.knowledge-variation-tree .analysis-mainline-cell .analysis-tree-move:has(.tjk-nag-brilliant),
.knowledge-variation-tree .analysis-variation-line .analysis-tree-move:has(.tjk-nag-brilliant){color:#12aeb8!important}
.knowledge-variation-tree .analysis-mainline-cell .analysis-tree-move:has(.tjk-nag-interesting),
.knowledge-variation-tree .analysis-variation-line .analysis-tree-move:has(.tjk-nag-interesting){color:#d653a0!important}
.knowledge-variation-tree .analysis-mainline-cell .analysis-tree-move:has(.tjk-nag-dubious),
.knowledge-variation-tree .analysis-variation-line .analysis-tree-move:has(.tjk-nag-dubious){color:#3185d8!important}
.knowledge-variation-tree .analysis-mainline-cell .analysis-tree-move:has(.tjk-nag-mistake),
.knowledge-variation-tree .analysis-variation-line .analysis-tree-move:has(.tjk-nag-mistake){color:#d98a16!important}
.knowledge-variation-tree .analysis-mainline-cell .analysis-tree-move:has(.tjk-nag-blunder),
.knowledge-variation-tree .analysis-variation-line .analysis-tree-move:has(.tjk-nag-blunder){color:#d64545!important}
.knowledge-variation-tree .analysis-tree-move.is-current,
.knowledge-variation-tree .analysis-tree-move.is-current .knowledge-move-symbols em{color:#fff!important}
html[data-theme="dark"] .knowledge-move-symbols em.tjk-nag-good,html[data-theme="dark"] .knowledge-move-symbols em.tjk-nag-only{color:#70c936!important}
html[data-theme="dark"] .knowledge-move-symbols em.tjk-nag-brilliant{color:#26c6ca!important}
html[data-theme="dark"] .knowledge-move-symbols em.tjk-nag-interesting{color:#ee76bd!important}
html[data-theme="dark"] .knowledge-move-symbols em.tjk-nag-dubious{color:#62a8ef!important}
html[data-theme="dark"] .knowledge-move-symbols em.tjk-nag-mistake{color:#f0a83f!important}
html[data-theme="dark"] .knowledge-move-symbols em.tjk-nag-blunder{color:#ef6868!important}


/* v15.1.142 — selected annotated moves keep the full SAN in annotation colour. */
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-good),
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-only){color:#4da514!important}
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-brilliant){color:#12aeb8!important}
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-interesting){color:#d653a0!important}
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-dubious){color:#3185d8!important}
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-mistake){color:#d98a16!important}
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-blunder){color:#d64545!important}
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-good) .tjk-move-annotation,
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-only) .tjk-move-annotation,
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-brilliant) .tjk-move-annotation,
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-interesting) .tjk-move-annotation,
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-dubious) .tjk-move-annotation,
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-mistake) .tjk-move-annotation,
:where(.analysis-tree-move,.knowledge-tree-move,.course-reading-move).is-current:has(.tjk-nag-blunder) .tjk-move-annotation{color:inherit!important}
.course-reading-move.is-current:not(:has(.tjk-nag-good,.tjk-nag-only,.tjk-nag-brilliant,.tjk-nag-interesting,.tjk-nag-dubious,.tjk-nag-mistake,.tjk-nag-blunder)){color:#222b35!important}
html[data-theme="dark"] .course-reading-move.is-current:not(:has(.tjk-nag-good,.tjk-nag-only,.tjk-nag-brilliant,.tjk-nag-interesting,.tjk-nag-dubious,.tjk-nag-mistake,.tjk-nag-blunder)){color:#f4f6f8!important}
