.analysis-demo {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  background: #141413;
  color: #fff;
  border: 1px solid #292825;
  box-shadow: 0 30px 80px rgba(25, 20, 12, .16);
}
.position-panel {
  padding: 28px;
  background: #1b1b1a;
  border-right: 1px solid rgba(255, 255, 255, .1);
}
.position-head, .position-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #89867f;
  font-size: .78rem;
}
.position-head strong { color: #dedbd3; font-weight: 500; }
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(214, 169, 95, .12);
  margin-right: 10px;
}
.position-body {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  margin: 22px auto;
  max-width: 560px;
}
.eval-track {
  position: relative;
  overflow: hidden;
  background: #eee9df;
  color: #10100f;
  border-radius: 2px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.eval-track span {
  position: absolute;
  inset: auto 0 0;
  height: 67%;
  background: #252422;
}
.eval-track strong {
  position: relative;
  z-index: 1;
  writing-mode: vertical-rl;
  font-size: .7rem;
  padding-top: 8px;
}
.chessboard {
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}
.square {
  position: relative;
  display: grid;
  place-items: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.65rem, 3.8vw, 3.3rem);
  line-height: 1;
  user-select: none;
}
.square.light { background: #d5c9af; }
.square.dark { background: #806d54; }
.square.target { box-shadow: inset 0 0 0 4px rgba(226, 177, 91, .9); }
.square.origin::after {
  content: '';
  position: absolute;
  width: 28%;
  height: 28%;
  border-radius: 50%;
  background: rgba(226, 177, 91, .7);
}
.square .white {
  color: #f8f2e6;
  text-shadow: 0 2px 1px #514838, 0 3px 8px rgba(0, 0, 0, .45);
}
.square .black { color: #171714; text-shadow: 0 2px 4px rgba(255, 255, 255, .12); }
.square .coord {
  position: absolute;
  font: 600 .56rem var(--sans);
  opacity: .72;
}
.square .rank { left: 4px; top: 2px; }
.square .file { right: 4px; bottom: 1px; }
.square.light .coord { color: #806d54; }
.square.dark .coord { color: #d5c9af; }
.position-foot strong { color: var(--gold2); font-weight: 600; }
.eval-change { font-family: 'Manrope'; color: #aaa; }
.eval-change b { color: #67645d; margin: 0 6px; }
.caissa-note {
  padding: 54px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: radial-gradient(circle at 90% 10%, rgba(214, 169, 95, .07), transparent 34%), #141413;
}
.note-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.note-top .tag { margin: 0; }
.mistake-label {
  padding: 6px 9px;
  background: rgba(214, 169, 95, .1);
  border: 1px solid rgba(214, 169, 95, .25);
  color: var(--gold2);
  font-size: .57rem;
  letter-spacing: .12em;
}
.caissa-note h3 {
  font: 600 clamp(1.8rem, 3.2vw, 2.7rem) var(--serif);
  line-height: 1.1;
  margin: 20px 0 24px;
}
.caissa-note h3 em { color: var(--gold2); font-weight: 600; }
.caissa-note > p { color: #aaa69f; margin: 0; }
.caissa-note blockquote {
  margin: 28px 0;
  padding-left: 18px;
  border-left: 2px solid var(--gold);
  color: #d8d4cb;
  font: italic 1rem/1.6 var(--serif);
}
.pattern-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-block: 1px solid rgba(255, 255, 255, .1);
  padding: 18px 0;
  margin-bottom: 28px;
}
.pattern-row span {
  display: block;
  color: #6f6c65;
  font-size: .58rem;
  letter-spacing: .14em;
}
.pattern-row strong { font-size: .85rem; }
.pattern-row > b { color: var(--gold2); font: 600 1.4rem 'Manrope'; }
.train-link {
  color: var(--gold2);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}
.train-link span { transition: transform .2s ease; }
.train-link:hover span { transform: translateX(4px); }
@media (max-width: 900px) {
  .analysis-demo { grid-template-columns: 1fr; }
  .position-panel { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .caissa-note { padding: 45px 34px; }
  .position-body { max-width: 520px; }
}
@media (max-width: 520px) {
  .position-panel { padding: 18px; }
  .position-body { grid-template-columns: 22px minmax(0, 1fr); gap: 8px; margin: 16px auto; }
  .square { font-size: clamp(1.45rem, 9vw, 2.5rem); }
  .square.target { box-shadow: inset 0 0 0 3px rgba(226, 177, 91, .9); }
  .position-foot { font-size: .7rem; }
  .caissa-note { padding: 36px 24px; }
  .note-top { align-items: flex-start; flex-direction: column; }
  .pattern-row { gap: 15px; }
  .pattern-row strong { font-size: .78rem; }
}
