/* SPDX-License-Identifier: GPL-3.0-or-later */
/* 棋库页补充样式（复用 review.css 的配色与卡片） */
.lib-main {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.search {
  flex: 1;
  min-width: 160px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
}
.search:focus { outline: none; border-color: var(--gold); }

#libPaste, #bkPaste {
  width: 100%;
  height: 150px;
  resize: vertical;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 10px;
}
#libPaste:focus, #bkPaste:focus { outline: none; border-color: var(--gold); }

.lib-list { margin-top: 6px; max-height: 520px; overflow: auto; }

.lib-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px dashed rgba(214, 178, 116, 0.12);
}
.lib-item:last-child { border-bottom: none; }
.li-main { min-width: 0; }
.li-main b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.li-main span { color: var(--muted); font-size: 12px; }
.li-actions { display: flex; gap: 6px; flex: none; }
.li-actions button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  cursor: pointer;
}
.li-actions button:hover { border-color: var(--gold); color: var(--gold-bright); }
.li-actions button.danger:hover { border-color: var(--bad); color: var(--bad); }

.bk-stats {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 10px;
}
.bk-stats b { color: var(--gold-bright); }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 10px;
}

.teach-cat {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
}
.teach-cat:focus { outline: none; border-color: var(--gold); }

.teach-cat-tag {
  font-style: normal;
  font-size: 11px;
  color: var(--gold-bright);
  border: 1px solid rgba(215, 177, 112, 0.4);
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 4px;
}

.row.center { justify-content: center; }

@media (max-width: 940px) {
  .lib-main { grid-template-columns: 1fr; }
}

/* 我的导入 / 内置棋库 分类标签 */
.lib-tabs { display: flex; gap: 8px; margin: 2px 0 14px; }
.lib-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.lib-tab.on {
  background: linear-gradient(135deg, #6cb2f5, #1f6fd6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(31, 111, 214, .25);
}

/* 移动端触控尺寸 */
@media (max-width: 760px) {
  .li-actions button { min-height: 38px; padding: 6px 12px; font-size: 13px; }
  .lib-tab { padding: 10px 20px; }
}
