.study-editor-host{padding:0 0 18px}.study-app{display:grid;grid-template-columns:246px minmax(0,1fr);height:calc(100vh - 184px);min-height:610px;max-height:850px;border:1px solid #d5dfed;border-radius:14px;overflow:hidden;background:#edf2f8;box-shadow:0 12px 30px rgba(15,31,68,.09)}
.study-sidebar{min-width:0;display:flex;flex-direction:column;padding:12px;color:#e8eefb;background:linear-gradient(180deg,#111a31 0%,#172442 100%);overflow:hidden}.study-sidebar-heading{display:flex;align-items:center;justify-content:space-between;margin:3px 2px 7px;color:#aebbd5;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.07em}.study-sidebar-heading button{width:27px;height:27px;border:1px solid #475d88;border-radius:6px;color:#fff;background:#24375f;cursor:pointer}
.study-library{display:flex;flex-direction:column;gap:4px;max-height:150px;overflow:auto}.study-library-item{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:6px;width:100%;padding:7px 8px;border:1px solid transparent;border-radius:7px;color:#dce5f7;background:transparent;text-align:left;cursor:pointer}.study-library-item span{color:#6d9cff;font-weight:900}.study-library-item strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.study-library-item small{color:#93a4c2;font-size:9px}.study-library-item:hover,.study-library-item.is-active{border-color:#486291;background:#263a63;color:#fff}.study-order-actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:4px;margin:7px 0 9px}.study-order-actions button,.study-sidebar-actions button{padding:6px 4px;border:1px solid #465b82;border-radius:6px;color:#dce5f6;background:#1e2e51;font:700 10px inherit;cursor:pointer}.study-order-actions button:disabled,.study-sidebar-actions button:disabled{opacity:.42;cursor:not-allowed}
.study-title-row label{display:grid;gap:4px;color:#aebbd5;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.study-title-row input{width:100%;box-sizing:border-box;padding:8px 9px;border:1px solid #3a4c70;border-radius:7px;background:#1c2a49;color:#fff;font:700 14px/1.2 inherit}.study-chapters{display:flex;flex-direction:column;gap:4px;overflow:auto;padding-right:2px}.study-chapter{display:grid;grid-template-columns:23px minmax(0,1fr);align-items:center;gap:7px;width:100%;padding:7px;border:1px solid transparent;border-radius:7px;color:#dce5f7;background:transparent;text-align:left;cursor:pointer}.study-chapter span{color:#6d9cff;font-weight:900}.study-chapter strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.study-chapter:hover,.study-chapter.is-active{border-color:#486291;background:#263a63;color:#fff}.study-sidebar-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:7px}.study-help{margin-top:auto;padding:9px 3px 1px;border-top:1px solid #344a70;color:#bdc8dc;font-size:10px;line-height:1.38}.study-help strong{color:#fff}.study-help p{margin:4px 0 0}
.study-main{min-width:0;min-height:0;display:flex;flex-direction:column;padding:9px}.study-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:5px;min-height:35px;margin-bottom:8px}.study-toolbar button,.study-toolbar select{min-height:31px;padding:5px 9px;border:1px solid #c4d0e0;border-radius:7px;color:#15233e;background:#fff;font:750 11px inherit;cursor:pointer}.study-toolbar button:hover:not(:disabled){border-color:#315ee7;color:#1846c6}.study-toolbar button:disabled{opacity:.45;cursor:not-allowed}.study-navigation{display:flex;gap:3px}.study-navigation button{min-width:33px;padding-inline:6px}.study-add-repertoire{color:#fff!important;background:#145ddd!important;border-color:#145ddd!important}.study-repertoire-scope{max-width:130px}.study-save-state{margin-left:auto;color:#18713f;font-size:10px;font-weight:750}.study-save-state.is-error{color:#b52a2a}
.study-content{min-height:0;flex:1;display:grid;grid-template-columns:minmax(390px,680px) minmax(350px,1fr);gap:10px;align-items:start}.study-board-column{min-width:0}.study-board-shell{display:grid;grid-template-columns:24px minmax(0,1fr);gap:5px;width:min(100%,calc(100vh - 255px),680px);margin:0 auto}.study-eval-bar{position:relative;align-self:stretch;overflow:hidden;border-radius:4px;background:#1f2937;color:#fff}.study-eval-bar>div{position:absolute;right:0;bottom:0;left:0;height:50%;background:#f5f5f5;transition:height .25s ease}.study-eval-bar span{position:absolute;z-index:2;top:5px;left:50%;writing-mode:vertical-rl;transform:translateX(-50%);font-size:.7rem;font-weight:800;mix-blend-mode:difference}.study-board-wrap{position:relative;width:100%;aspect-ratio:1;container-type:inline-size;overflow:hidden;border:1px solid #263246;border-radius:5px;box-shadow:0 8px 22px rgba(7,19,45,.2);background:#789b59}.study-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));width:100%;height:100%;min-width:0!important;touch-action:none;user-select:none}.study-square{position:relative;display:grid;place-items:center;min-width:0;min-height:0;aspect-ratio:1;overflow:hidden}.study-square.is-light{background:#eeeecf}.study-square.is-dark{background:#789b59}.study-square.is-last{box-shadow:inset 0 0 0 999px rgba(238,224,72,.31)}.study-square.is-selected:after{content:"";position:absolute;inset:4%;z-index:4;border:4px solid rgba(241,196,25,.9);pointer-events:none}.study-square.is-legal-target:before{content:"";position:absolute;z-index:4;width:24%;aspect-ratio:1;border-radius:50%;background:rgba(23,45,26,.32);pointer-events:none}.study-piece,.study-drag-ghost{display:grid;place-items:center;width:100%;height:100%;font-family:"Segoe UI Symbol","DejaVu Sans",sans-serif;font-size:clamp(32px,10cqw,74px);line-height:1;cursor:grab;filter:drop-shadow(0 1px 0 rgba(255,255,255,.45))}.study-piece{position:relative;z-index:3}.study-piece.is-hidden{visibility:hidden}.study-drag-ghost{position:fixed;z-index:10000;pointer-events:none;filter:drop-shadow(0 8px 8px rgba(0,0,0,.25))}.study-coord{position:absolute;z-index:5;font-size:clamp(8px,1.4cqw,12px);font-weight:800;pointer-events:none;color:rgba(24,50,24,.72)}.study-coord.analysis-rank{top:2px;left:4px}.study-coord.analysis-file{right:4px;bottom:2px}.study-annotations{position:absolute;inset:0;z-index:6;width:100%;height:100%;pointer-events:none}.study-board-status{display:flex;justify-content:space-between;gap:12px;width:min(100%,calc(100vh - 255px),680px);margin:0 auto;padding:7px 0 0 29px;color:#536176;font-size:11px;font-weight:750}.study-return-preview{display:block;margin:5px auto 0;padding:6px 10px;border:1px solid #9db3d8;border-radius:6px;background:#eef4ff;color:#1647a6;font-weight:750;cursor:pointer}
.study-notation{min-width:0;height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid #d0dae8;border-radius:9px;background:#fff}.study-engine-panel{border-bottom:1px solid #dbe3ee;background:#f8fafc}.study-engine-heading{display:flex;align-items:center;justify-content:space-between;padding:8px 10px 5px}.study-engine-heading>div{display:grid}.study-engine-heading span{color:#1b5dc8;font-size:9px;font-weight:900;letter-spacing:.08em}.study-engine-heading strong{font-size:13px}.study-engine-heading label{display:flex;align-items:center;gap:5px;font-size:11px;font-weight:800}.study-engine-controls{display:grid;grid-template-columns:1fr 70px 60px auto;gap:5px;padding:0 9px 6px}.study-engine-controls select,.study-engine-controls button{min-height:29px;border:1px solid #bdc9d8;border-radius:6px;background:#fff;font:700 10px inherit}.study-engine-state{padding:0 10px 5px;color:#66758a;font-size:10px}.study-engine-lines{display:grid;gap:3px;max-height:115px;overflow:auto;padding:0 7px 7px}.study-engine-lines button{display:grid;grid-template-columns:48px 1fr auto;gap:6px;align-items:center;width:100%;padding:6px 7px;border:1px solid transparent;border-radius:5px;background:#fff;text-align:left;cursor:pointer}.study-engine-lines button:hover{border-color:#bcd0ff;background:#edf3ff}.study-engine-lines b{color:#17469d}.study-engine-lines span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:650}.study-engine-lines small{color:#718096}.study-engine-empty{padding:5px 4px;color:#78869a;font-size:10px}.study-notation-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 11px;border-bottom:1px solid #e1e7f0;background:#f7f9fc}.study-notation-head div{display:grid;gap:2px;min-width:0}.study-notation-head strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#172440;font-size:13px}.study-notation-head small{color:#7a8699;font-size:10px}.study-notation-head button{padding:5px 8px;border:1px solid #ccd6e4;border-radius:6px;background:#fff;color:#5a6679;font:700 10px inherit;cursor:pointer}.study-tree{flex:1;min-height:150px;overflow:auto;padding:11px;color:#1e2b43;font-size:14px;line-height:1.9}.study-mainline{display:inline}.study-move-unit{display:inline}.study-move{display:inline-flex;align-items:baseline;gap:2px;margin:1px 2px;padding:2px 5px;border:0;border-radius:5px;color:#1b2945;background:transparent;font:750 14px/1.45 inherit;cursor:pointer}.study-move:hover{background:#e8edfb}.study-move.is-current{color:#fff;background:#3564d8}.study-move-number{color:#728097;font-size:11px;font-weight:850}.study-move.is-current .study-move-number{color:#dce6ff}.study-move em{color:#ffdf87;font-style:normal;font-weight:900}.study-inline-comment{display:inline;margin:0 4px;color:#66758c;font-size:12px;font-style:italic}.study-comment-move{margin:0 2px;padding:1px 4px;border:1px solid #b8c9e9;border-radius:5px;background:#edf3ff;color:#174ea6;font:800 11px inherit;cursor:pointer}.study-square-reference{color:#145ddd;font-weight:850}.study-variations{display:block;margin:4px 0 5px 15px;padding:5px 8px;border-left:3px solid #ccd6e7;border-radius:0 6px 6px 0;background:#f7f9fc;line-height:1.7}.study-variation{display:block;color:#46556d}.study-parenthesis{color:#8a96a9;font-weight:800}.study-nested-variations{color:#7b8799}.study-direct-comment{display:grid;grid-template-columns:minmax(0,1fr) 85px;gap:7px;margin:5px 4px 8px;padding:8px;border:1px solid #cbd8ec;border-radius:7px;background:#f7faff}.study-direct-comment label{display:grid;gap:3px;color:#43516a;font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.04em}.study-direct-comment textarea,.study-direct-comment select{width:100%;box-sizing:border-box;border:1px solid #bfccdd;border-radius:6px;background:#fff;padding:6px;color:#1e2b43;font:500 11px/1.35 inherit;text-transform:none;letter-spacing:0}.study-direct-comment textarea{min-height:54px;resize:vertical}.study-direct-preview{grid-column:1/-1;padding-top:2px;color:#5f6d81;font-size:11px}.study-empty{display:grid;place-items:center;gap:4px;min-height:130px;color:#6f7d92;text-align:center}.study-empty strong{color:#263650}.study-empty span{max-width:360px;font-size:12px}.study-drawing-help{margin:0;padding:7px 10px;border-top:1px solid #e1e7f0;background:#fafbfd;color:#7b8798;font-size:9px}.study-failure{padding:28px;border:1px solid #e3b1b1;border-radius:12px;background:#fff4f4;color:#7c2222}.study-failure h2{margin-top:0}.study-failure button{padding:8px 12px;border:1px solid #bc7777;border-radius:7px;background:#fff;cursor:pointer}
@media(max-width:1180px){.study-app{grid-template-columns:210px minmax(0,1fr)}.study-content{grid-template-columns:minmax(360px,1fr) minmax(310px,.9fr)}.study-toolbar button{padding-inline:7px}}@media(max-width:940px){.study-app{height:auto;max-height:none;min-height:0;grid-template-columns:1fr}.study-sidebar{min-height:0}.study-help{display:none}.study-library,.study-chapters{max-height:130px}.study-content{grid-template-columns:1fr}.study-board-shell{width:min(100%,680px)}.study-notation{min-height:520px}}@media(max-width:620px){.study-main{padding:6px}.study-toolbar{gap:4px}.study-toolbar button,.study-toolbar select{min-height:29px;padding:4px 6px;font-size:9px}.study-content{gap:7px}.study-direct-comment{grid-template-columns:1fr}.study-direct-preview{grid-column:1}.study-piece,.study-drag-ghost{font-size:11.5vw}}

/* v13.4 desktop viewport fit: keep the complete Study workspace visible without page scrolling. */
.workspace-panel[data-workspace-panel="study"]{padding-bottom:0}
.study-editor-host{padding-bottom:0}
@media(min-width:941px){
  .study-app{height:calc(100vh - 166px);min-height:560px;max-height:none}
}

/* v13.5 compact move comments, complete symbols, engine arrows */
.study-engine-controls { grid-template-columns:minmax(90px,1fr) 66px 58px auto auto; }
.study-arrow-toggle.is-active { border-color:#6c95e9; background:#e9f1ff; color:#164aa8; }
.study-direct-comment {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(150px,190px); gap:7px;
  margin:4px 4px 8px; padding:7px; border:1px solid #cbd8ec; border-radius:7px; background:#f7faff;
}
.study-direct-comment > textarea { width:100%; min-height:54px; box-sizing:border-box; resize:vertical; padding:7px; border:1px solid #bfccdd; border-radius:6px; background:#fff; color:#1e2b43; font:500 11px/1.4 inherit; }
.study-symbol-field { display:grid; align-content:start; gap:4px; color:#43516a; font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.04em; }
.study-symbol-field select { width:100%; min-height:34px; padding:5px; border:1px solid #bfccdd; border-radius:6px; background:#fff; color:#1e2b43; font:650 10px inherit; text-transform:none; letter-spacing:0; }
.study-direct-preview { grid-column:1/-1; padding-top:1px; }
.study-eval-bar.is-flipped > div { top:0; bottom:auto; }
.study-eval-bar span { top:auto; bottom:6px; mix-blend-mode:normal; padding:2px 1px; border-radius:3px; background:rgba(15,23,42,.55); color:#fff; }
@media(max-width:620px){.study-engine-controls{grid-template-columns:1fr 1fr 1fr}.study-engine-controls button{grid-column:auto}.study-direct-comment{grid-template-columns:1fr}.study-direct-preview{grid-column:1}}

/* v13.9: comments are edited exactly where they appear in the move tree. */
.study-move-unit.is-editing {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  vertical-align: baseline;
}
.study-inline-comment-editor {
  display: inline;
  min-width: 96px;
  max-width: min(100%, 620px);
  margin: 0 3px;
  padding: 1px 4px;
  border: 0;
  border-bottom: 1px dashed #9fb0c9;
  border-radius: 3px;
  outline: none;
  color: #66758c;
  background: transparent;
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.study-inline-comment-editor:focus {
  border-bottom-color: #3564d8;
  background: #f2f6ff;
  box-shadow: 0 0 0 2px rgba(53,100,216,.10);
}
.study-inline-comment-editor:empty::before {
  content: attr(data-placeholder);
  color: #9aa7ba;
  pointer-events: none;
}
.study-inline-symbol {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 4px;
  color: #66758c;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.study-inline-symbol select {
  width: 88px;
  min-height: 24px;
  padding: 2px 4px;
  border: 1px solid #c5d1e0;
  border-radius: 5px;
  background: #fff;
  color: #24324a;
  font: 650 9px/1.2 inherit;
  text-transform: none;
  letter-spacing: 0;
}
@media(max-width:620px){
  .study-inline-comment-editor{min-width:72px;max-width:100%;}
  .study-inline-symbol select{width:76px;}
}
.study-comment-edit {
  display:inline-flex;
  align-items:center;
  margin:0 2px;
  padding:1px 5px;
  border:1px dashed #b8c5d8;
  border-radius:5px;
  background:#f8faff;
  color:#65748a;
  font:700 9px/1.5 inherit;
  cursor:pointer;
}
.study-comment-edit:hover{border-color:#3564d8;color:#1d4fc0;background:#eef4ff;}

/* v14.1: compact inline comments and selected-move symbol control. */
.study-tree {
  color:#17243c;
}
.study-move-unit {
  display:inline-flex;
  align-items:baseline;
  flex-wrap:wrap;
  max-width:100%;
  vertical-align:baseline;
}
.study-inline-comment-slot {
  display:inline-flex;
  align-items:baseline;
  min-width:26px;
  min-height:1.35em;
  margin:0 3px 0 2px;
  vertical-align:baseline;
  cursor:text;
}
.study-inline-comment-slot.has-comment { min-width:0; }
.study-inline-comment {
  display:inline;
  margin:0;
  color:#3f4d63;
  font-size:12.5px;
  font-style:italic;
  font-weight:580;
  line-height:1.55;
}
.study-inline-comment-editor {
  display:inline-block;
  min-width:26px;
  width:auto;
  max-width:min(100%,620px);
  min-height:1.35em;
  margin:0 3px 0 2px;
  padding:0;
  border:0;
  border-radius:0;
  outline:none;
  color:#334158;
  background:transparent;
  box-shadow:none;
  font-size:12.5px;
  font-style:italic;
  font-weight:580;
  line-height:1.55;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  vertical-align:baseline;
}
.study-inline-comment-editor:focus {
  border:0;
  background:transparent;
  box-shadow:none;
}
.study-inline-comment-editor:empty::before { content:none; }
.study-comment-edit,.study-inline-symbol { display:none !important; }
.study-move-inspector {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-height:38px;
  padding:6px 10px;
  border-top:1px solid #e1e7f0;
  background:#fbfcfe;
}
.study-move-inspector.is-empty { visibility:hidden; min-height:0; height:0; padding:0; border:0; }
.study-inspector-move {
  color:#46556c;
  font-size:11px;
  font-weight:800;
}
.study-move-inspector label {
  display:flex;
  align-items:center;
  gap:6px;
  color:#5b687c;
  font-size:9px;
  font-weight:850;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.study-move-inspector select {
  width:min(190px,32vw);
  min-height:28px;
  padding:3px 6px;
  border:1px solid #c5d1e0;
  border-radius:6px;
  background:#fff;
  color:#24324a;
  font:650 10px/1.2 inherit;
  text-transform:none;
  letter-spacing:0;
}
@media(max-width:620px){
  .study-inline-comment-slot,.study-inline-comment-editor{min-width:20px;}
  .study-move-inspector{padding-inline:7px;}
  .study-move-inspector select{width:min(160px,52vw);}
}


/* v14.1.1: larger invisible click target after each move. */
.study-inline-comment-slot {
  min-width:72px;
  min-height:1.55em;
  margin-right:6px;
  padding:0 2px;
}
.study-inline-comment-slot.has-comment { min-width:18px; }
.study-inline-comment-editor {
  min-width:72px;
  min-height:1.55em;
  margin-right:6px;
  padding:0 2px;
}
@media(max-width:620px){
  .study-inline-comment-slot,.study-inline-comment-editor{min-width:52px;}
}

/* v14.1.2: visible but unobtrusive inline comment targets and engine placeholders. */
.study-inline-comment-slot:not(.has-comment),
.study-inline-comment-editor {
  min-width:88px;
  min-height:1.55em;
  padding:0 6px;
  border:1px solid #d9e5f5;
  border-radius:5px;
  background:#f3f7fd;
}
.study-inline-comment-slot:not(.has-comment):hover {
  border-color:#bdd0ee;
  background:#edf4ff;
}
.study-inline-comment-editor:focus {
  border:1px solid #9dbbea;
  background:#f7faff;
  box-shadow:0 0 0 2px rgba(53,100,216,.10);
}
.study-engine-line-placeholder {
  display:grid;grid-template-columns:48px 1fr auto;gap:6px;align-items:center;
  padding:6px 7px;border:1px solid transparent;border-radius:5px;
  color:#8190a5;background:#f8fafc;font-size:10px;
}
.study-engine-line-placeholder b{color:#6d7d94}.study-engine-line-placeholder span{font-size:11px}.study-engine-line-placeholder small{color:#9aa6b7}
@media(max-width:620px){.study-inline-comment-slot:not(.has-comment),.study-inline-comment-editor{min-width:68px;}}

/* v14.2: comments are edited in the selected-move panel and displayed beside moves. */
.study-inline-comment-slot,
.study-inline-comment-editor{display:none!important}
.study-inline-comment{
  display:inline;
  margin:0 7px 0 2px;
  color:#34445f;
  font-size:12.5px;
  font-style:normal;
  font-weight:560;
  line-height:1.55;
}
.study-move-inspector.study-comment-panel{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(150px,190px);
  grid-template-areas:"head symbol" "comment symbol";
  align-items:start;
  gap:7px 10px;
  min-height:0;
  padding:9px 10px;
  border-top:1px solid #dce5f0;
  background:#f8fafc;
}
.study-comment-panel-head{
  grid-area:head;
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
  color:#5f6d82;
  font-size:10px;
}
.study-comment-panel-head .study-inspector-move{
  flex:0 0 auto;
  color:#1d2d49;
  font-size:12px;
}
.study-comment-panel textarea{
  grid-area:comment;
  width:100%;
  min-height:58px;
  max-height:150px;
  box-sizing:border-box;
  resize:vertical;
  padding:8px 9px;
  border:1px solid #c3d1e2;
  border-radius:7px;
  outline:none;
  background:#fff;
  color:#23344f;
  font:500 12px/1.45 inherit;
}
.study-comment-panel textarea:focus{
  border-color:#7ea5ea;
  box-shadow:0 0 0 2px rgba(49,94,231,.11);
}
.study-comment-panel .study-symbol-field{
  grid-area:symbol;
  display:grid!important;
  align-content:start;
  gap:5px;
}
.study-comment-panel .study-symbol-field select{
  width:100%;
  min-height:34px;
}
@media(max-width:620px){
  .study-move-inspector.study-comment-panel{
    grid-template-columns:1fr;
    grid-template-areas:"head" "comment" "symbol";
  }
}


/* v14.5: keep the full Study board and notation panel inside the desktop viewport. */
@media(min-width:941px){
  .study-app{height:calc(100dvh - 166px);min-height:0;}
  .study-board-shell,.study-board-status{width:min(100%,calc(100dvh - 285px),680px);}
  .study-content{min-height:0;overflow:hidden;}
  .study-board-column,.study-notation{min-height:0;}
}
@media(min-width:941px) and (max-height:720px){
  .study-main{padding:6px;}
  .study-toolbar{margin-bottom:5px;}
  .study-board-shell,.study-board-status{width:min(100%,calc(100dvh - 265px),680px);}
}

/* v14.5.6: move deletion, undo/redo, on-board navigation and resizable panels. */
.study-history-actions{display:flex;gap:3px}
.study-history-button{min-width:34px!important;padding-inline:7px!important;font-size:18px!important;line-height:1!important}
.study-board-navigation{display:flex;justify-content:center;gap:5px;width:min(100%,calc(100vh - 255px),680px);margin:6px auto 0;padding-left:29px}
.study-board-navigation button{min-width:44px;min-height:31px;padding:4px 10px;border:1px solid #c2cede;border-radius:7px;background:#fff;color:#18345f;font:800 12px/1 inherit;cursor:pointer}
.study-board-navigation button:hover:not(:disabled){border-color:#5278d7;background:#edf3ff;color:#1747b1}
.study-board-navigation button:disabled{opacity:.38;cursor:not-allowed}

.study-engine-lines{height:var(--study-engine-lines-height,154px);min-height:82px;max-height:none;overflow:auto;resize:none}
.study-tree{flex:1 1 auto;min-height:110px;max-height:none;overflow:auto}
.study-panel-resizer{position:relative;flex:0 0 10px;height:10px;cursor:ns-resize;touch-action:none;background:#f7f9fc;border-top:1px solid #dfe6ef;border-bottom:1px solid #dfe6ef}
.study-panel-resizer span{position:absolute;left:50%;top:50%;width:44px;height:3px;border-radius:999px;background:#9daabd;transform:translate(-50%,-50%)}
.study-panel-resizer:hover,.study-panel-resizer:focus-visible{background:#eaf1fc}
.study-panel-resizer:hover span{background:#5473a4}
body.is-study-resizing{cursor:ns-resize!important;user-select:none!important}
body.is-study-resizing *{cursor:ns-resize!important}

.study-move-unit{position:relative}
.study-move-delete{display:inline-grid;place-items:center;width:18px;height:18px;margin:-1px 1px 0 -2px;padding:0;border:0;border-radius:50%;background:transparent;color:#a0aabc;font:900 15px/1 inherit;opacity:0;cursor:pointer;vertical-align:middle;transition:opacity .12s ease,background .12s ease,color .12s ease}
.study-move-unit:hover>.study-move-delete,.study-move-unit:focus-within>.study-move-delete{opacity:1}
.study-move-delete:hover,.study-move-delete:focus-visible{opacity:1;background:#fff0f0;color:#bd2c2c;outline:none}
.study-move-context-menu{position:absolute;z-index:40;left:4px;top:calc(100% + 3px);display:block;min-width:128px;padding:4px;border:1px solid #c7d2e1;border-radius:7px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.18);white-space:nowrap}
.study-move-context-menu button{width:100%;padding:7px 9px;border:0;border-radius:5px;background:#fff;color:#b42318;text-align:left;font:750 11px/1.2 inherit;cursor:pointer}
.study-move-context-menu button:hover{background:#fff0ef}
.study-move-unit.has-context-menu{z-index:45}
.study-comment-panel-head{position:relative}
.study-delete-selected{flex:0 0 auto;margin-left:auto;padding:4px 7px;border:1px solid #e1b7b3;border-radius:6px;background:#fff;color:#a92b23;font:750 9px/1.2 inherit;cursor:pointer}
.study-delete-selected:hover{border-color:#cc6d64;background:#fff1f0}

@media(min-width:941px){
  .study-notation{overflow:hidden}
  .study-engine-panel{flex:0 0 auto;min-height:0}
  .study-tree{flex-shrink:1}
  .study-move-inspector.study-comment-panel{flex:0 0 auto}
  .study-drawing-help{flex:0 0 auto}
}
@media(max-width:940px){
  .study-engine-lines{height:min(var(--study-engine-lines-height,154px),240px)}
  .study-tree{min-height:220px;flex:0 0 auto}
  .study-board-navigation{width:min(100%,680px);padding-left:0}
}
@media(max-width:620px){
  .study-move-delete{opacity:.75}
  .study-delete-selected{font-size:8px}
  .study-comment-panel-head{flex-wrap:wrap}
}

/* v14.7.2 Opening Lab labels and direct drag ordering. */
.study-library-item[draggable="true"],.study-chapter[draggable="true"]{cursor:grab}
.study-library-item.is-dragging,.study-chapter.is-dragging{opacity:.45;cursor:grabbing}
.study-library-item.is-drag-over,.study-chapter.is-drag-over{border-color:#8ab3ff!important;box-shadow:inset 0 3px 0 #6d9cff;background:#304a7d!important}
.study-delete-actions{grid-template-columns:1fr;margin:7px 0 9px}
.study-delete-actions button{color:#ffd8d8;border-color:#72506a;background:#382641}


/* v14.7.6 — larger laptop board without clipping and stable notation scrolling. */
@media(min-width:941px){
  .study-app{height:calc(100dvh - 145px);max-height:none}
  .study-content{grid-template-columns:minmax(430px,720px) minmax(360px,1fr)}
  .study-board-shell,.study-board-status,.study-board-navigation{
    width:min(100%,calc(100dvh - 210px),720px);
  }
  .study-tree{overflow-anchor:none}
}
@media(min-width:941px) and (max-height:760px){
  .study-app{height:auto;min-height:610px;overflow:visible}
  .study-main{overflow:visible}
  .study-content{overflow:visible;align-items:start}
  .study-board-shell,.study-board-status,.study-board-navigation{width:min(100%,calc(100dvh - 205px),620px)}
  .study-notation{height:calc(100dvh - 175px);min-height:560px}
}
@media(max-width:940px){
  .study-app{overflow:visible}
  .study-sidebar{overflow:visible}
  .study-main{overflow:visible}
  .study-board-shell,.study-board-status,.study-board-navigation{width:min(100%,680px)}
}

/* v15.1.5 public Opening/Variation Labs */
.study-title-row{display:grid;gap:8px}
.study-title-row label{display:grid;gap:5px}
.study-title-row select{width:100%;padding:9px 10px;border:1px solid var(--tjk-border,#d5deea);border-radius:8px;background:#fff;color:#17213d}
.study-public-actions{display:flex;flex-wrap:wrap;gap:7px}
.study-public-actions button{flex:1 1 auto}
.public-lab-modal{position:fixed;inset:0;z-index:12000;display:grid;place-items:center;padding:18px;background:rgba(5,10,20,.72);backdrop-filter:blur(5px)}
.public-lab-loading,.public-lab-error{padding:28px;border-radius:16px;background:#fff;color:#12203b;box-shadow:0 25px 70px rgba(0,0,0,.35)}
.public-lab-error{position:relative;max-width:560px}.public-lab-error>button{position:absolute;right:12px;top:10px;border:0;background:none;font-size:1.6rem;cursor:pointer}
.public-lab-dialog{width:min(1180px,96vw);height:min(790px,94dvh);display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;border-radius:18px;background:#fff;color:#111c39;box-shadow:0 28px 90px rgba(0,0,0,.45)}
.public-lab-dialog>header{display:flex;justify-content:space-between;gap:20px;align-items:start;padding:18px 22px;border-bottom:1px solid #dce3ed}
.public-lab-dialog>header span{font-size:.75rem;font-weight:900;letter-spacing:.14em;color:#2464d8}.public-lab-dialog>header h2{margin:4px 0 2px}.public-lab-dialog>header p{margin:0;color:#6c7890}.public-lab-dialog>header>button{width:44px;height:44px;border:1px solid #d8e0eb;border-radius:12px;background:#fff;font-size:1.55rem;cursor:pointer}
.public-lab-content{display:grid;grid-template-columns:minmax(420px,1fr) minmax(330px,430px);gap:16px;min-height:0;padding:16px}
.public-lab-content>section,.public-lab-content>aside{min-height:0}.public-lab-content>aside{display:grid;grid-template-rows:auto minmax(100px,1fr) minmax(190px,260px);gap:10px}
.public-lab-board{display:grid;grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr);width:min(100%,650px);aspect-ratio:1;border:2px solid #253451;border-radius:7px;overflow:hidden}
.public-lab-square{display:grid;place-items:center;min-width:0;min-height:0}.public-lab-square.is-light{background:#e9edcd}.public-lab-square.is-dark{background:#759d58}.public-lab-piece{display:grid;width:100%;height:100%;place-items:center}.public-lab-piece .tjk-chess-piece{width:90%;height:90%}
.public-lab-controls{display:flex;gap:8px;margin-top:8px}.public-lab-controls button{min-width:58px;padding:8px;border:1px solid #d4ddea;border-radius:8px;background:#fff;cursor:pointer}
.public-lab-chapters{display:flex;gap:6px;overflow:auto}.public-lab-chapters button{padding:8px 10px;border:1px solid #d5deea;border-radius:8px;background:#fff;white-space:nowrap;cursor:pointer}.public-lab-chapters button.is-active{background:#3e4bdc;color:#fff;border-color:#3e4bdc}
.public-lab-moves{overflow:auto;padding:10px;border:1px solid #dce3ed;border-radius:10px;background:#f8fafc;display:flex;flex-wrap:wrap;align-content:flex-start;gap:4px}.public-lab-moves button{border:0;border-radius:6px;background:transparent;padding:5px 7px;font-weight:750;cursor:pointer}.public-lab-moves button.is-current{background:#4150dc;color:#fff}
.community-chat{display:grid;grid-template-rows:auto minmax(70px,1fr) auto;border:1px solid #d8e0eb;border-radius:10px;overflow:hidden;background:#10131a;color:#e8edf7}.community-chat>header{display:flex;justify-content:space-between;padding:8px 10px;border-bottom:1px solid #303440}.community-chat-messages{overflow:auto;padding:8px 10px;display:grid;align-content:start;gap:6px}.community-chat-messages>div{display:grid;grid-template-columns:auto 1fr;gap:8px;font-size:.8rem}.community-chat-messages b{color:#7db7ff}.community-chat-messages p{color:#a2adbf}.community-chat form{display:grid;grid-template-columns:1fr 40px;border-top:1px solid #303440}.community-chat input{min-width:0;border:0;background:#090b0f;color:#fff;padding:9px}.community-chat button{border:0;background:#22283a;color:#fff;cursor:pointer}.community-chat-signin{margin:0;padding:9px 10px;border-top:1px solid #303440;color:#aab4c5;font-size:.8rem}
@media(max-width:850px){.public-lab-dialog{height:96dvh}.public-lab-content{grid-template-columns:1fr;overflow:auto}.public-lab-board{width:100%}.public-lab-content>aside{grid-template-rows:auto minmax(120px,auto) minmax(190px,240px)}}


/* v15.1.122: Repertoire editor must never crop the bottom ranks. The page may
   scroll vertically; the board itself stays square and fits the viewport. */
@media (min-width:941px){
  .study-app{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;align-items:start!important}
  .study-main,.study-content{min-height:0!important;overflow:visible!important}
  .study-board-shell,.study-board-status,.study-board-navigation{width:min(100%,calc(100dvh - 230px),680px)!important}
  .study-notation{height:min(680px,calc(100dvh - 175px));min-height:460px}
}
@media (min-width:941px) and (max-height:760px){
  .study-board-shell,.study-board-status,.study-board-navigation{width:min(100%,calc(100dvh - 215px),590px)!important}
  .study-notation{height:560px;min-height:460px}
}


/* v15.1.123 — restore the established Analysis-Board-style notation in
   Opening Lab and Variation Lab. v15.1.122 accidentally replaced this with
   a compact inline notation. The board/viewport fixes from 15.1.122 remain. */
.study-mainline{display:block;width:100%}
.study-mainline-row{display:grid!important;grid-template-columns:42px minmax(0,1fr) minmax(0,1fr);align-items:stretch;width:100%;min-height:34px!important;padding:0!important;box-sizing:border-box;border-bottom:1px solid #e1e7ef;background:transparent}
.study-mainline-number{display:flex;align-items:center;justify-content:center;min-height:34px!important;color:#758196;font-size:13px;font-weight:800;border-right:1px solid #dbe2ec}
.study-mainline-cell{display:flex;align-items:center!important;min-width:0;min-height:34px!important}
.study-mainline-cell+.study-mainline-cell{border-left:1px solid #edf1f6}
.study-mainline-cell:empty::after{content:"";min-height:34px}
.study-mainline-cell>.study-move-unit{display:flex;flex:1;min-width:0;min-height:34px!important;align-items:center!important;height:auto!important}
.study-mainline-cell .study-move{display:flex;align-items:center!important;width:100%;min-width:0;min-height:34px!important;margin:0!important;padding:3px 9px!important;border-radius:0!important;font-size:16px!important;line-height:1.15!important;font-weight:760;box-sizing:border-box}
.study-mainline-cell .study-move-number{display:none}
.study-variations{position:relative;display:block!important;width:calc(100% - 12px)!important;box-sizing:border-box;margin:1px 0 2px 12px!important;padding:1px 0 1px 13px!important;border-left:2px solid rgba(148,163,184,.45)!important;border-radius:0!important;background:transparent!important}
.study-variation-line{position:relative;display:block!important;width:100%;box-sizing:border-box;padding:2px 4px 2px 0!important;color:#687486;line-height:1.18!important}
.study-variation-line::before{content:"";position:absolute;left:-13px!important;top:16px!important;width:10px!important;border-top:1px solid rgba(148,163,184,.52)!important}
.study-nested-variations{display:block!important;margin:1px 0 1px 10px!important;padding-left:12px!important;border-left:1px solid rgba(148,163,184,.38)!important;color:#657389}
.study-nested-variations>.study-variation-line::before{left:-12px!important;width:9px!important;border-top-color:rgba(148,163,184,.42)!important}
.study-variation-line .study-move-unit{display:inline-flex!important;align-items:center!important;vertical-align:middle!important}
.study-variation-line .study-move{display:inline-flex!important;align-items:center!important;vertical-align:middle!important;min-height:24px!important;padding:1px 4px!important;font-size:14px!important;line-height:1.15!important}
.study-variation-line[data-variation-depth="2"] .study-move{font-size:13px!important}
.study-variation-line[data-variation-depth="3"] .study-move{font-size:12.5px!important}
.study-variation-line[data-variation-depth="4"] .study-move,.study-variation-line[data-variation-depth="5"] .study-move,.study-variation-line[data-variation-depth="6"] .study-move{font-size:12px!important}
.study-parenthesis{display:none!important}
html[data-theme="dark"] .study-mainline-row{border-color:#344153}
html[data-theme="dark"] .study-mainline-number{border-color:#344153;color:#9aa7b9}
html[data-theme="dark"] .study-mainline-cell+.study-mainline-cell{border-color:#293548}
html[data-theme="dark"] .study-variations,html[data-theme="dark"] .study-variation-line::before{border-color:rgba(119,134,156,.52)!important}
html[data-theme="dark"] .study-nested-variations,html[data-theme="dark"] .study-nested-variations>.study-variation-line::before{border-color:rgba(102,117,141,.46)!important}
@media(max-width:620px){
  .study-mainline-row{grid-template-columns:34px minmax(0,1fr) minmax(0,1fr);min-height:32px!important}
  .study-mainline-number,.study-mainline-cell{min-height:32px!important}
  .study-mainline-cell .study-move{min-height:32px!important;font-size:15px!important;padding:3px 7px!important}
  .study-variation-line .study-move{font-size:13px!important}
  .study-variation-line[data-variation-depth="2"] .study-move{font-size:12.5px!important}
  .study-variation-line[data-variation-depth="3"] .study-move{font-size:12px!important}
}

/* v15.1.124 — Opening/Variation Lab comments interrupt the move table just
   like conventional annotated notation. A comment after White gets a full-
   width row; Black's reply resumes below as "... move". */
.study-mainline-comment-row{
  display:block;
  width:100%;
  box-sizing:border-box;
  border-bottom:1px solid #e1e7ef;
  background:#fbfcfe;
}
.study-mainline-comment{
  display:block;
  width:100%;
  box-sizing:border-box;
  padding:8px 10px 9px;
  color:#4e5d73;
  font-size:13px;
  font-style:normal;
  font-weight:500;
  line-height:1.42;
  white-space:normal;
  overflow-wrap:anywhere;
}
.study-move-placeholder{
  display:flex;
  align-items:center;
  width:100%;
  min-height:34px;
  box-sizing:border-box;
  padding:3px 9px;
  color:#7e899a;
  font-size:16px;
  font-weight:650;
  letter-spacing:.04em;
}
.study-variation-line .study-inline-comment{
  font-style:normal;
  font-size:13px;
  line-height:1.35;
  color:#5f6d81;
}
html[data-theme="dark"] .study-mainline-comment-row{background:#171719;border-color:#343434}
html[data-theme="dark"] .study-mainline-comment{color:#c7c7c7}
html[data-theme="dark"] .study-move-placeholder{color:#8f8f8f}
html[data-theme="dark"] .study-variation-line .study-inline-comment{color:#c8c8c8}
@media(max-width:620px){
  .study-mainline-comment{padding:7px 8px 8px;font-size:12px}
  .study-move-placeholder{min-height:32px;padding:3px 7px;font-size:15px}
}


/* v15.1.125 — Opening Lab notation uses the Analysis Board move renderer 1:1. */
.study-tree .analysis-mainline-row,.study-tree .analysis-mainline-number,.study-tree .analysis-mainline-cell,
.study-tree .analysis-variations,.study-tree .analysis-variation-line,.study-tree .analysis-nested-variations,
.study-tree .analysis-tree-move{box-sizing:border-box}
.study-tree .analysis-mainline-cell>.study-move-unit{display:flex;flex:1 1 auto;min-width:0;position:relative}
.study-tree .analysis-variation-line>.study-move-unit{display:inline-flex;position:relative;vertical-align:middle}
.study-tree .analysis-tree-move em.study-analysis-nag{margin-left:3px;font-style:normal;font-weight:900;color:inherit}
.study-move-delete{display:none!important}
.study-drawing-help{display:none!important}
.study-comment-panel-head>span:not(.study-inspector-move){display:none!important}

/* v15.1.128 — Opening Lab main line and side lines match Analysis Board geometry exactly. */
.study-tree .analysis-mainline-row{display:grid!important;grid-template-columns:42px minmax(0,1fr) minmax(0,1fr)!important;align-items:stretch!important;width:100%!important;min-height:34px!important;padding:0!important;box-sizing:border-box!important}
.study-tree .analysis-mainline-number,.study-tree .analysis-mainline-cell{min-height:34px!important;align-items:center!important}
.study-tree .analysis-mainline-cell{display:flex!important;min-width:0!important}
.study-tree .analysis-mainline-cell>.study-move-unit{display:flex!important;flex:1 1 auto!important;min-width:0!important;height:100%!important}
.study-tree .analysis-mainline-cell .analysis-tree-move{display:flex!important;align-items:center!important;width:100%!important;min-width:0!important;min-height:34px!important;margin:0!important;padding:3px 9px!important;border-radius:0!important;font-size:16px!important;line-height:1.15!important;box-sizing:border-box!important}
.study-tree .analysis-variation-line{padding:2px 4px 2px 0!important;line-height:1.18!important}
.study-tree .analysis-variation-line .analysis-tree-move{display:inline-flex!important;align-items:center!important;vertical-align:middle!important;min-height:24px!important;padding:1px 4px!important;font-size:14px!important;line-height:1.15!important}
@media(max-width:760px){
  .study-tree .analysis-mainline-row{grid-template-columns:34px minmax(0,1fr) minmax(0,1fr)!important}
  .study-tree .analysis-mainline-cell .analysis-tree-move{font-size:15px!important;padding:3px 7px!important}
  .study-tree .analysis-variation-line .analysis-tree-move{font-size:13px!important}
}


/* v15.1.134 — Opening Lab uses exactly the Analysis Board notation weight. */
.study-tree .analysis-mainline-cell .analysis-tree-move{font-weight:700!important}
.study-tree .analysis-variation-line .analysis-tree-move{font-weight:680!important}

/* v15.1.137 — the Studies engine uses the exact Analysis Board PV rows. */
.study-engine-lines{display:grid;gap:3px;padding:0 8px 6px}
.study-engine-lines>.analysis-pv-row{
  display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:7px;align-items:center;width:100%;
  min-height:34px;padding:5px 7px;border:1px solid transparent;border-radius:7px;background:#fff;
  color:inherit;text-align:left;cursor:pointer;font:inherit;font-size:.84rem;box-sizing:border-box;
}
.study-engine-lines>.analysis-pv-row:hover{border-color:#bcd0ff;background:#edf3ff}
.study-engine-lines>.analysis-pv-row.is-loading,.study-engine-lines>.analysis-pv-row.is-loading:hover{background:#f8fafc;border-color:transparent;cursor:default}
.study-engine-lines>.analysis-pv-row .analysis-pv-score{color:#0f3c8f;font-weight:900}
.study-engine-lines>.analysis-pv-row .analysis-pv-line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}
.study-engine-lines>.analysis-pv-row small{color:#64748b;font-size:.72rem}


/* v15.1.139 — restore Opening Lab drag feedback: keep legal destinations visible and outline the square currently under the dragged piece. */
.study-square.is-drop-target{box-shadow:inset 0 0 0 5px rgba(241,196,25,.95);z-index:6}

/* v15.1.140 — Opening Lab compact four-column workspace.
   The dark Lab panel now starts exactly beside the board and has the same
   height as the chessboard. The opening database reuses the Analysis Board
   database classes and backend instead of a separate visual implementation. */
@media (min-width:1181px){
  .study-app{display:block!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
  .study-main{padding:6px!important}
  .study-toolbar{margin-left:251px;margin-bottom:5px}
  .study-content{
    --study-board-size:min(calc(100dvh - 245px),650px);
    --study-board-track:calc(var(--study-board-size) + 29px);
    display:grid!important;
    grid-template-columns:246px var(--study-board-track) minmax(340px,1fr)!important;
    gap:5px!important;
    align-items:start!important;
    justify-content:stretch!important;
    overflow:visible!important;
  }
  .study-content.has-opening-database{grid-template-columns:246px var(--study-board-track) minmax(340px,1fr) minmax(285px,320px)!important}
  .study-content.has-opening-database.is-db-collapsed{grid-template-columns:246px var(--study-board-track) minmax(340px,1fr) 42px!important}
  .study-sidebar{
    height:var(--study-board-size)!important;
    min-height:0!important;
    max-height:none!important;
    box-sizing:border-box;
    border-radius:8px;
  }
  .study-library{max-height:min(150px,24vh)}
  .study-chapters{min-height:0;max-height:min(190px,29vh)}
  .study-board-column{width:var(--study-board-track);min-width:0}
  .study-board-shell,.study-board-status,.study-board-navigation{
    width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  .study-notation{
    height:var(--study-board-size)!important;
    min-height:0!important;
    max-height:var(--study-board-size)!important;
  }
  .study-database-column.analysis-database-column{
    width:auto;
    min-width:0;
    height:var(--study-board-size)!important;
    max-height:var(--study-board-size)!important;
  }
  .study-database-column .analysis-database-card{height:100%!important;min-height:0!important}
  .study-database-column .analysis-db-moves{max-height:none!important}
  .study-database-column.is-collapsed{width:42px!important;min-width:42px!important;height:42px!important;max-height:42px!important;align-self:start}
  .study-database-column.is-collapsed .analysis-db-heading-actions [data-study-db-action="refresh"],
  .study-database-column.is-collapsed .analysis-db-heading-actions [data-study-db-action="toggle-filters"]{display:none!important}
}
@media (max-width:1180px){
  .study-app{display:block!important;height:auto!important;max-height:none!important;overflow:visible!important}
  .study-toolbar{margin-left:0!important}
  .study-content{grid-template-columns:1fr!important;gap:7px!important}
  .study-sidebar{height:auto!important;max-height:none!important;border-radius:8px}
  .study-database-column.analysis-database-column{height:auto!important;max-height:none!important;width:100%!important}
  .study-database-column .analysis-database-card{height:min(520px,65dvh)!important;min-height:330px!important}
  .study-database-column.is-collapsed{width:42px!important;min-width:42px!important;height:42px!important;align-self:start}
}

/* v15.1.141 — keep all Opening Lab engine controls visible beside the optional database. */
@media (min-width:1181px){
  .study-content.has-opening-database .study-engine-controls{
    grid-template-columns:minmax(72px,1fr) 52px 46px 58px 68px;
    gap:4px;
    padding-left:7px;
    padding-right:7px;
  }
  .study-content.has-opening-database .study-engine-controls select,
  .study-content.has-opening-database .study-engine-controls button{
    min-width:0;
    width:100%;
    padding-left:4px;
    padding-right:4px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:clip;
    box-sizing:border-box;
  }
}


/* v15.1.142 — compact, unified Opening Lab controls and annotations. */
@media (min-width:1181px){
  .study-toolbar{
    margin-left:0!important;
    flex-wrap:nowrap!important;
    gap:4px!important;
    min-width:0;
    overflow:visible;
  }
  .study-toolbar button,.study-toolbar select{white-space:nowrap;padding-left:7px;padding-right:7px}
  .study-toolbar .study-save-state{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .study-database-column.analysis-database-column{margin-left:4px}
  .study-content.has-opening-database .study-engine-controls{grid-template-columns:minmax(82px,1fr) 52px 46px minmax(76px,88px)!important;gap:5px!important}
  .study-content.has-opening-database .study-engine-controls button{overflow:visible!important;text-overflow:clip!important}
}
.study-move-context-menu{min-width:205px!important}
.study-move-context-menu button{color:#24364f!important;font-weight:750!important}
.study-move-context-menu button:hover:not(:disabled){background:#eef4ff!important}
.study-move-context-menu button:disabled{opacity:.38;cursor:not-allowed}
.study-move-context-menu button.is-danger{margin-top:3px;border-top:1px solid #e3e8ef;color:#b42318!important}

.study-move-inspector.study-comment-panel{
  grid-template-columns:1fr!important;
  grid-template-areas:"head" "comment" "symbols"!important;
  gap:6px!important;
  padding:8px 10px 9px!important;
}
.study-comment-panel textarea{grid-area:comment!important;min-height:46px!important;max-height:82px!important;resize:vertical!important}
.study-symbol-picker{grid-area:symbols;margin-top:0!important}

/* Make the main line thinner everywhere this component appears. */
.study-tree .analysis-mainline-row{min-height:30px!important}
.study-tree .analysis-mainline-number,.study-tree .analysis-mainline-cell{min-height:30px!important}
.study-tree .analysis-mainline-cell .analysis-tree-move{min-height:30px!important;padding:2px 8px!important;font-size:15.5px!important}

/* Selected annotated moves keep their annotation colour instead of turning white. */
.study-tree .analysis-tree-move.is-current.has-nag-quality{background:#eef2f7!important}
.study-tree .analysis-tree-move.is-current.nag-quality-good{color:#4da514!important;background:#eef8e9!important}
.study-tree .analysis-tree-move.is-current.nag-quality-brilliant{color:#12aeb8!important;background:#e8f8f9!important}
.study-tree .analysis-tree-move.is-current.nag-quality-interesting{color:#d653a0!important;background:#fbecf5!important}
.study-tree .analysis-tree-move.is-current.nag-quality-dubious{color:#3185d8!important;background:#eaf3fc!important}
.study-tree .analysis-tree-move.is-current.nag-quality-mistake{color:#d98a16!important;background:#fff5e5!important}
.study-tree .analysis-tree-move.is-current.nag-quality-blunder{color:#d64545!important;background:#fdecec!important}
.study-tree .analysis-tree-move.is-current.has-nag-quality .tjk-move-annotation{color:inherit!important}


/* v15.1.143 — denser engine PVs, larger move/comment/symbol workspace, and panels aligned through the board navigation row. */
.study-engine-lines{min-height:0!important;box-sizing:border-box!important;gap:1px!important;padding:0 8px!important}
.study-engine-lines>.analysis-pv-row{min-height:25px!important;padding:1px 7px!important;border-radius:5px!important;line-height:1.12!important}
.study-engine-lines>.analysis-pv-row .analysis-pv-line{line-height:1.12!important}
.study-engine-lines>.analysis-pv-row small{line-height:1!important}

@media (min-width:1181px){
  .study-content{--study-panel-height:calc(var(--study-board-size) + 56px)}
  .study-sidebar{height:var(--study-panel-height)!important}
  .study-notation{height:var(--study-panel-height)!important;max-height:var(--study-panel-height)!important}
  .study-database-column.analysis-database-column{height:var(--study-panel-height)!important;max-height:var(--study-panel-height)!important}
  .study-database-column.is-collapsed{height:42px!important;max-height:42px!important}
  .study-tree{flex:1 1 42%;min-height:145px!important;padding:7px 9px!important}
  .study-move-inspector.study-comment-panel{flex:1 1 46%;min-height:235px!important;overflow:hidden!important;grid-template-rows:auto auto minmax(0,1fr)!important}
  .study-comment-panel textarea{min-height:58px!important;max-height:96px!important}
  .study-symbol-picker{min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
  .study-symbol-picker>div{grid-template-columns:repeat(3,minmax(0,1fr))!important;max-height:none!important;min-height:0!important;overflow-y:auto!important;align-content:start!important}
}

/* The old nested Study menu is no longer rendered; Opening Lab now invokes the exact Analysis Board menu. */
.study-move-context-menu{display:none!important}


/* v15.1.144 — responsive Opening Lab fit and hard removal of the obsolete notation header. */
.study-notation-head{display:none!important;height:0!important;min-height:0!important;padding:0!important;border:0!important;overflow:hidden!important}
.study-engine-lines{
  height:var(--study-engine-lines-height,154px)!important;
  min-height:0!important;
  max-height:var(--study-engine-lines-height,154px)!important;
  flex:0 0 var(--study-engine-lines-height,154px)!important;
  overflow:auto!important;
  box-sizing:border-box!important;
  gap:0!important;
  padding:0 6px!important;
}
.study-engine-lines>.analysis-pv-row{
  min-height:22px!important;
  padding:0 6px!important;
  line-height:1.05!important;
  gap:5px!important;
}
.study-engine-lines>.analysis-pv-row .analysis-pv-line,.study-engine-lines>.analysis-pv-row small{line-height:1.05!important}
.study-repertoire-scope{max-width:none!important;min-width:132px!important;flex:0 0 132px!important}
.study-database-column.analysis-database-column,.study-database-column .analysis-database-card{min-width:0!important;overflow:hidden}
.study-database-column .analysis-db-head,
.study-database-column .analysis-db-row{grid-template-columns:minmax(34px,42px) minmax(48px,60px) minmax(0,1fr)!important;gap:5px!important;padding-left:6px!important;padding-right:6px!important}
.study-database-column .analysis-db-filter-row{grid-template-columns:62px minmax(0,1fr) auto minmax(0,1fr)!important;gap:3px!important;padding-left:6px!important;padding-right:6px!important}
.study-database-column .analysis-db-heading-actions{gap:4px!important;min-width:0}
.study-database-column .analysis-db-heading-actions button{min-width:0!important;padding-left:5px!important;padding-right:5px!important}

@media (min-width:1280px){
  .study-main{padding:5px!important}
  .study-content{
    --study-board-size:min(calc(100dvh - 245px),clamp(500px,38vw,650px));
    --study-board-track:calc(var(--study-board-size) + 29px);
    --study-panel-height:calc(var(--study-board-size) + 58px);
    grid-template-columns:clamp(205px,15vw,246px) var(--study-board-track) minmax(255px,1fr)!important;
    gap:5px!important;
    width:100%!important;
    min-width:0!important;
  }
  .study-content.has-opening-database{
    grid-template-columns:clamp(205px,15vw,246px) var(--study-board-track) minmax(255px,1fr) clamp(235px,18vw,320px)!important;
  }
  .study-content.has-opening-database.is-db-collapsed{
    grid-template-columns:clamp(205px,15vw,246px) var(--study-board-track) minmax(255px,1fr) 42px!important;
  }
  .study-sidebar,.study-notation,.study-database-column.analysis-database-column{
    height:var(--study-panel-height)!important;max-height:var(--study-panel-height)!important;
  }
  .study-database-column.analysis-database-column{margin-left:2px!important}
  .study-database-column.is-collapsed{height:42px!important;max-height:42px!important}
  .study-tree{flex:1 1 auto!important;min-height:150px!important}
  .study-move-inspector.study-comment-panel{flex:1 1 auto!important;min-height:215px!important}
}

/* Medium desktop/notebook widths: never clip the database. Put it on its own row. */
@media (min-width:941px) and (max-width:1279px){
  .study-main{padding:5px!important}
  .study-content,.study-content.has-opening-database,.study-content.has-opening-database.is-db-collapsed{
    --study-board-size:min(calc(100dvh - 245px),min(51vw,560px));
    --study-board-track:calc(var(--study-board-size) + 29px);
    grid-template-columns:clamp(190px,18vw,225px) var(--study-board-track) minmax(250px,1fr)!important;
    gap:5px!important;
    width:100%!important;
    min-width:0!important;
  }
  .study-database-column.analysis-database-column{
    grid-column:1/-1!important;width:100%!important;margin-left:0!important;height:min(440px,52dvh)!important;max-height:min(440px,52dvh)!important;
  }
  .study-database-column.is-collapsed{grid-column:3!important;justify-self:end!important;width:42px!important;height:42px!important;max-height:42px!important}
  .study-sidebar,.study-notation{height:calc(var(--study-board-size) + 58px)!important;max-height:calc(var(--study-board-size) + 58px)!important}
}

@media (max-width:940px){
  .study-repertoire-scope{min-width:126px!important;flex:0 0 126px!important}
  .study-engine-lines{min-height:0!important;max-height:var(--study-engine-lines-height,154px)!important}
}
@media (min-width:941px) and (max-width:1279px){
  .study-toolbar{flex-wrap:wrap!important;overflow:visible!important}
}

/* v15.1.145 — collapsible move-symbol area and reliable symbol scrolling. */
.study-comment-panel-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}
.study-inspector-actions{display:flex;align-items:center;gap:6px;min-width:0}
.study-symbol-toggle{
  min-width:0!important;
  padding:4px 8px!important;
  border:1px solid #c9d5e5!important;
  border-radius:6px!important;
  background:#f7f9fc!important;
  color:#42546c!important;
  font-size:11px!important;
  font-weight:800!important;
  white-space:nowrap!important;
  cursor:pointer!important;
}
.study-symbol-toggle:hover{background:#eef4ff!important;border-color:#9eb8dc!important;color:#1d4fc0!important}
.study-symbol-picker{min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
.study-symbol-picker>div{
  min-height:0!important;
  max-height:none!important;
  height:auto!important;
  flex:1 1 auto!important;
  overflow-y:scroll!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
  align-content:start!important;
  padding-right:3px!important;
}
.study-notation:not(.study-symbols-collapsed) .study-move-inspector.study-comment-panel{
  grid-template-rows:auto auto minmax(0,1fr)!important;
}
.study-notation.study-symbols-collapsed .study-symbol-picker{display:none!important}
.study-notation.study-symbols-collapsed .study-move-inspector.study-comment-panel{
  flex:0 0 auto!important;
  min-height:0!important;
  height:auto!important;
  overflow:visible!important;
  grid-template-rows:auto auto!important;
}
.study-notation.study-symbols-collapsed .study-tree{
  flex:1 1 auto!important;
  min-height:0!important;
}
.study-mainline-comment-row[hidden]{display:none!important}
html[data-theme="dark"] .study-symbol-toggle{background:#202a37!important;border-color:#3d4b5e!important;color:#d8e1ec!important}
html[data-theme="dark"] .study-symbol-toggle:hover{background:#24344a!important;border-color:#6589bc!important;color:#fff!important}

/* v15.1.146 — Opening Lab: keep move-symbol controls visible and make the picker genuinely scrollable. */
.study-comment-panel-head{
  flex-wrap:wrap!important;
  overflow:visible!important;
}
/* v15.1.125 hid every secondary span in this header. The symbol actions are
   intentionally restored here with equal/higher specificity and a later rule. */
.study-comment-panel-head > span.study-inspector-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  margin-left:auto!important;
  flex:0 0 auto!important;
  min-width:0!important;
}
.study-symbol-picker{
  min-height:0!important;
  max-height:260px!important;
  overflow:hidden!important;
}
.study-symbol-picker > div{
  flex:0 1 auto!important;
  height:clamp(150px,22vh,220px)!important;
  min-height:120px!important;
  max-height:220px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
  align-content:start!important;
  padding-right:5px!important;
}
.study-notation.study-symbols-collapsed .study-symbol-picker{
  display:none!important;
}
@media (max-width:1180px){
  .study-comment-panel-head > span.study-inspector-actions{
    flex-basis:100%!important;
    justify-content:flex-start!important;
    margin-left:0!important;
  }
}


/* v15.1.147 — independent comment/engine collapsing, bottom-safe symbol scroller. */
.study-comment-toggle,
.study-engine-collapse-toggle{
  min-width:0!important;
  padding:4px 8px!important;
  border:1px solid #c9d5e5!important;
  border-radius:6px!important;
  background:#f7f9fc!important;
  color:#42546c!important;
  font-size:11px!important;
  font-weight:800!important;
  white-space:nowrap!important;
  cursor:pointer!important;
}
.study-comment-toggle:hover,
.study-engine-collapse-toggle:hover{
  background:#eef4ff!important;
  border-color:#9eb8dc!important;
  color:#1d4fc0!important;
}
html[data-theme="dark"] .study-comment-toggle,
html[data-theme="dark"] .study-engine-collapse-toggle{
  background:#202a37!important;
  border-color:#3d4b5e!important;
  color:#d8e1ec!important;
}
html[data-theme="dark"] .study-comment-toggle:hover,
html[data-theme="dark"] .study-engine-collapse-toggle:hover{
  background:#24344a!important;
  border-color:#6589bc!important;
  color:#fff!important;
}

/* Comments collapse independently from move symbols. */
.study-notation.study-comments-collapsed .study-comment-panel textarea{
  display:none!important;
}
.study-notation.study-comments-collapsed:not(.study-symbols-collapsed) .study-move-inspector.study-comment-panel{
  grid-template-rows:auto minmax(0,1fr)!important;
}
.study-notation.study-comments-collapsed.study-symbols-collapsed .study-move-inspector.study-comment-panel{
  flex:0 0 auto!important;
  min-height:0!important;
  height:auto!important;
  grid-template-rows:auto!important;
}

/* The symbol picker scrollbar must end visibly inside the field, not under its crop edge. */
.study-symbol-picker{
  box-sizing:border-box!important;
  overflow:visible!important;
  padding-bottom:6px!important;
}
.study-symbol-picker > div{
  box-sizing:border-box!important;
  padding-bottom:10px!important;
  margin-bottom:2px!important;
  scrollbar-gutter:stable!important;
}

/* Entire Stockfish workspace can collapse to one slim re-open row. */
.study-engine-heading-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex:0 0 auto!important;
}
.study-engine-body{
  min-height:0;
}
.study-engine-panel.is-collapsed{
  flex:0 0 auto!important;
  border-bottom:1px solid #dbe3ee!important;
}
.study-engine-panel.is-collapsed .study-engine-heading{
  min-height:31px!important;
  padding:4px 8px!important;
}
.study-engine-panel.is-collapsed .study-engine-heading>div,
.study-engine-panel.is-collapsed .study-engine-heading label,
.study-engine-panel.is-collapsed .study-engine-body{
  display:none!important;
}
.study-engine-panel.is-collapsed .study-engine-heading{
  justify-content:flex-end!important;
}
.study-notation.study-engine-collapsed .study-tree{
  flex:1 1 auto!important;
  min-height:0!important;
}

/* v15.1.150 — Opening Lab: one authoritative symbol/comment layout.
   The symbol area itself is fixed; its scrollbar belongs completely inside it. */
.study-square.is-comment-reference{
  outline:4px solid rgba(35,116,207,.88)!important;
  outline-offset:-4px!important;
}
.study-symbol-picker-title{
  display:block!important;
  flex:0 0 auto!important;
  margin:0 0 5px!important;
  color:#66758c!important;
  font-size:10px!important;
  font-weight:850!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
}

/* Placeholder rows ("...") are exactly as high as ordinary main-line moves. */
.study-tree .analysis-mainline-row,
.study-tree .analysis-mainline-number,
.study-tree .analysis-mainline-cell{min-height:27px!important}
.study-tree .analysis-mainline-cell>.study-move-unit,
.study-tree .analysis-mainline-cell>.study-move-placeholder{min-height:27px!important}
.study-tree .analysis-mainline-cell .analysis-tree-move,
.study-tree .analysis-mainline-cell>.study-move-placeholder{
  min-height:27px!important;
  height:27px!important;
  box-sizing:border-box!important;
  padding:1px 7px!important;
  font-size:15px!important;
  line-height:25px!important;
}
.study-tree .analysis-mainline-cell>.study-move-placeholder{
  display:flex!important;
  align-items:center!important;
  width:100%!important;
  margin:0!important;
}
.study-tree .analysis-variation-line{padding:1px 3px 1px 0!important;line-height:1.12!important}
.study-tree .analysis-variation-line .analysis-tree-move{min-height:22px!important;padding:0 4px!important;line-height:1.1!important}

@media (min-width:941px){
  .study-notation{
    min-height:0!important;
    overflow:hidden!important;
  }
  .study-notation .study-tree{
    flex:1 1 auto!important;
    min-height:32px!important;
    overflow:auto!important;
  }
  .study-move-inspector.study-comment-panel{
    flex:0 0 auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
    box-sizing:border-box!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:"head" "comment" "symbols"!important;
    grid-template-rows:auto auto 220px!important;
    gap:6px!important;
  }
  .study-notation.study-comments-collapsed:not(.study-symbols-collapsed) .study-move-inspector.study-comment-panel{
    grid-template-areas:"head" "symbols"!important;
    grid-template-rows:auto 220px!important;
  }
  .study-notation.study-symbols-collapsed:not(.study-comments-collapsed) .study-move-inspector.study-comment-panel{
    grid-template-areas:"head" "comment"!important;
    grid-template-rows:auto auto!important;
  }
  .study-notation.study-comments-collapsed.study-symbols-collapsed .study-move-inspector.study-comment-panel{
    grid-template-areas:"head"!important;
    grid-template-rows:auto!important;
  }
  .study-notation.study-comments-collapsed .study-comment-panel textarea{display:none!important}
  .study-notation.study-symbols-collapsed .study-symbol-picker{display:none!important}

  /* Fixed 220 px visual field. The title is inside the fixed box and the list owns the remainder. */
  .study-notation:not(.study-symbols-collapsed) .study-symbol-picker{
    grid-area:symbols!important;
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    align-content:stretch!important;
    width:100%!important;
    height:220px!important;
    min-height:220px!important;
    max-height:220px!important;
    margin:0!important;
    padding:7px 7px 7px!important;
    border:1px solid #cfdaea!important;
    border-radius:8px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    background:#fff!important;
  }
  .study-notation:not(.study-symbols-collapsed) .study-symbol-picker-scroll{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    align-content:start!important;
    gap:5px!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:0 5px 7px 0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
    box-sizing:border-box!important;
  }
  .study-symbol-picker-scroll>label{min-width:0!important}

  /* Closing comments removes their row entirely; notation immediately takes the freed height. */
  .study-notation.study-comments-collapsed .study-tree{flex-grow:1!important}

  /* Engine expansion yields before the fixed symbol box. */
  .study-engine-lines{min-height:0!important}
}

html[data-theme="dark"] .study-symbol-picker-title{color:#aeb9c8!important}
html[data-theme="dark"] .study-notation:not(.study-symbols-collapsed) .study-symbol-picker{
  border-color:#3a475b!important;background:#1c2531!important;
}

/* Give the Opening Lab notation/engine workspace enough width that the right edge does not crop. */
@media (min-width:1280px){
  .study-content{
    --study-board-size:min(calc(100dvh - 245px),clamp(500px,36vw,625px))!important;
    --study-board-track:calc(var(--study-board-size) + 29px)!important;
    grid-template-columns:clamp(195px,14vw,230px) var(--study-board-track) minmax(330px,1fr)!important;
  }
  .study-content.has-opening-database{
    grid-template-columns:clamp(195px,14vw,230px) var(--study-board-track) minmax(330px,1fr) clamp(225px,17vw,300px)!important;
  }
  .study-content.has-opening-database.is-db-collapsed{
    grid-template-columns:clamp(195px,14vw,230px) var(--study-board-track) minmax(330px,1fr) 42px!important;
  }
  .study-notation{min-width:330px!important;box-sizing:border-box!important}
}
@media (min-width:941px) and (max-width:1279px){
  .study-content,.study-content.has-opening-database,.study-content.has-opening-database.is-db-collapsed{
    grid-template-columns:clamp(180px,17vw,215px) var(--study-board-track) minmax(300px,1fr)!important;
  }
  .study-notation{min-width:300px!important;box-sizing:border-box!important}
}

/* Short screens: never crop the fixed symbol box. The whole notation column may scroll as a final fallback. */
@media (min-width:941px) and (max-height:950px){
  .study-engine-lines{
    height:min(var(--study-engine-lines-height,154px),86px)!important;
    max-height:min(var(--study-engine-lines-height,154px),86px)!important;
    flex:0 1 min(var(--study-engine-lines-height,154px),86px)!important;
  }
  .study-comment-panel textarea{min-height:44px!important;max-height:56px!important}
}
@media (min-width:941px) and (max-height:780px){
  .study-engine-lines{
    height:min(var(--study-engine-lines-height,154px),58px)!important;
    max-height:min(var(--study-engine-lines-height,154px),58px)!important;
    flex-basis:min(var(--study-engine-lines-height,154px),58px)!important;
  }
  .study-notation{overflow-y:auto!important;overflow-x:hidden!important}
  .study-tree{flex:0 1 auto!important;min-height:36px!important}
}


/* v15.1.151 — Opening Lab: restore unrestricted manual resizing of the Engine Lines area.
   Older short-screen rules capped the visible PV area at 86/58px, so dragging appeared broken. */
.study-engine-lines{
  height:var(--study-engine-lines-height,154px)!important;
  max-height:var(--study-engine-lines-height,154px)!important;
  flex:0 0 var(--study-engine-lines-height,154px)!important;
  min-height:0!important;
}
@media (min-width:941px) and (max-height:950px){
  .study-engine-lines{
    height:var(--study-engine-lines-height,154px)!important;
    max-height:var(--study-engine-lines-height,154px)!important;
    flex:0 0 var(--study-engine-lines-height,154px)!important;
  }
}
@media (min-width:941px) and (max-height:780px){
  .study-engine-lines{
    height:var(--study-engine-lines-height,154px)!important;
    max-height:var(--study-engine-lines-height,154px)!important;
    flex-basis:var(--study-engine-lines-height,154px)!important;
  }
}
.study-engine-resizer{display:block!important;visibility:visible!important;pointer-events:auto!important;cursor:ns-resize!important}


/* v15.1.153 — Opening Lab board outline matches the common one-pixel board frame. */
.study-board-wrap{border-width:1px!important}

/* v15.1.155 — on roomy desktop/laptop screens, prioritize the Opening Lab
   engine/notation column immediately to the right of the board. */
@media (min-width:1450px){
  .study-content{
    --study-board-size:min(calc(100dvh - 245px),clamp(500px,34vw,610px))!important;
    --study-board-track:calc(var(--study-board-size) + 29px)!important;
    grid-template-columns:clamp(190px,13vw,220px) var(--study-board-track) minmax(400px,1.25fr)!important;
  }
  .study-content.has-opening-database{
    grid-template-columns:clamp(190px,13vw,220px) var(--study-board-track) minmax(400px,1.25fr) clamp(220px,15vw,275px)!important;
  }
  .study-content.has-opening-database.is-db-collapsed{
    grid-template-columns:clamp(190px,13vw,220px) var(--study-board-track) minmax(400px,1.25fr) 42px!important;
  }
  .study-notation{min-width:400px!important;box-sizing:border-box!important}
}

/* v15.1.158 — private course-copy guard + one-like public labs */
.study-private-copy-note{display:inline-flex;align-items:center;padding:7px 10px;border:1px solid #d5deea;border-radius:8px;background:#f4f7fb;color:#536176;font-size:.78rem;font-weight:800}
.public-lab-header-actions{display:flex;align-items:center;gap:8px}.public-lab-like{min-width:72px;min-height:42px;border:1px solid #d5deea;border-radius:999px;background:#fff;color:#526176;font-weight:900;cursor:pointer}.public-lab-like:hover:not(:disabled){border-color:#e44772;color:#c52c5b}.public-lab-like.is-liked,.public-lab-like:disabled{border-color:#e9a1b8;background:#fff0f4;color:#c52c5b;cursor:default;opacity:1}
html[data-theme="dark"] .study-private-copy-note{background:#202a38;color:#cbd5e1;border-color:#46536a}html[data-theme="dark"] .public-lab-like{background:#172033;color:#dbe5f3;border-color:#45536a}html[data-theme="dark"] .public-lab-like.is-liked,html[data-theme="dark"] .public-lab-like:disabled{background:#482133;color:#ffbdd1;border-color:#82415a}
/* v15.1.232: larger adaptive study list and Lichess-style study flairs. */
.study-library{max-height:clamp(150px,30vh,320px);flex:0 1 auto}
.study-library-flair{display:flex;align-items:center;justify-content:center;min-width:22px;font-size:15px;line-height:1}
.study-flair-control{position:relative;display:flex;flex-direction:column;gap:4px;align-self:end;color:#63738c;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.study-flair-button{min-width:42px;height:34px;border:1px solid #c5d1e0;border-radius:7px;background:#fff;color:#17243c;font-size:20px;cursor:pointer}
.study-flair-picker{position:absolute;z-index:90;top:calc(100% + 5px);left:0;width:310px;max-width:min(72vw,310px);max-height:270px;overflow:auto;display:grid;grid-template-columns:repeat(8,1fr);gap:4px;padding:8px;border:1px solid #334a75;border-radius:9px;background:#111a31;box-shadow:0 12px 30px rgba(3,12,30,.38)}
.study-flair-picker button{display:flex;align-items:center;justify-content:center;min-width:30px;height:31px;padding:0;border:1px solid transparent;border-radius:5px;background:#1d2d50;color:#fff;font-size:18px;cursor:pointer}.study-flair-picker button:hover{border-color:#6d9cff;background:#2b4476}.study-flair-picker .study-flair-none{grid-column:1/-1;height:27px;font-size:10px;font-weight:800;text-transform:none}
