/* 标签栏与底部链接按钮样式 */
.ra-opts { flex-wrap: wrap; }

/* 排盘页「标签」一栏：一栏 4 个，自适应 */
.field-tags { flex: 1 1 100%; }
.tag-pick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}
.tag-pick .tag-chip {
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  padding: 6px 4px;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.tag-pick .tag-chip.on {
  background: var(--ink, #16151a);
  border-color: var(--ink, #16151a);
  color: var(--card, #f5f9f0);
}
.tag-pick .tag-empty { font-size: 12.5px; color: var(--ink-3); }

/* 一行 4 个（窄屏自动减到 2 个） */
@media (min-width: 901px) {
  .tag-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tag-pick .tag-chip { font-size: 13.5px; padding: 7px 6px; }
}
@media (max-width: 900px) {
  .tag-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tag-pick .tag-chip { font-size: 13px; padding: 8px 6px; }
}

/* 底部动作条：清空盘面 / 链接 / 存入卦例 三等分自适应 */
.cast-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cast-buttons #btnNew,
.cast-buttons #btnLinkBottom,
.cast-buttons #btnSave { flex: 1 1 0; min-width: 0; }
.cast-buttons #btnLinkBottom { flex: 0 1 auto; min-width: 96px; }
.cast-buttons .save-hint { flex: 1 1 100%; }

@media (max-width: 900px) {
  .cast-buttons #btnLinkBottom { min-width: 84px; }
}
