/* ============================================================
 * 和牌点数计算区块样式（与原站配色 / 排版保持一致）
 * ============================================================ */

.mj-calc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 33px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border, #d5ddd5);
  background: #fff;
  color: var(--foreground, #1c2a2c);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.mj-calc-btn:hover {
  background: var(--accent, #eef5f0);
  border-color: color-mix(in oklch, var(--primary, #1d4d3c) 35%, #fff);
  transform: translateY(-1px);
}
.mj-calc-btn.on {
  background: var(--primary, #1d4d3c);
  border-color: var(--primary, #1d4d3c);
  color: #fff;
}

/* ---------- 三元牌宝牌循环提示（牌盘上方空白处，只显示不参与计算） ---------- */
.mj-dora-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding-left: 12px;
  font-family: inherit;
  font-size: 12px;
  color: #5d6b63;
  white-space: nowrap;
  user-select: none;
}
.mj-dh-lab {
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f3f7f3;
  border: 1px solid #e2eae2;
  font-size: 11.5px;
}
.mj-dh-seq { display: inline-flex; align-items: center; gap: 3px; }
.mj-dh-tile {
  height: 26px;
  width: auto;
  border-radius: 3px;
  opacity: .68;
  vertical-align: middle;
}
.mj-dh-tile.on {
  opacity: 1;
  outline: 2px solid #c07a1f;
  outline-offset: 1px;
}
.mj-dh-ar { font-style: normal; color: #9aa8a0; font-size: 12px; }

/* ---------- 结果区 ---------- */
.mj-sc {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 6px 0 2px;
  padding: 14px 16px 12px;
  border: 1px solid var(--border, #d5ddd5);
  border-radius: 10px;
  background: #fff;
  color: var(--foreground, #1c2a2c);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.6;
  box-sizing: border-box;
  overflow-x: auto;
}

.mj-sc-head { display: flex; flex-direction: column; gap: 4px; }
.mj-sc-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; letter-spacing: .02em;
}
.mj-sc-badge {
  font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  color: var(--primary, #1d4d3c);
  background: color-mix(in oklch, var(--primary, #1d4d3c) 10%, #fff);
  border: 1px solid color-mix(in oklch, var(--primary, #1d4d3c) 22%, #fff);
}
.mj-sc-meta { font-size: 12.5px; color: #5d6b63; word-break: break-word; }

.mj-sc-opts {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  margin: 11px 0 9px; padding-bottom: 10px;
  border-bottom: 1px dashed var(--border, #d5ddd5);
}
.mj-sc-optlab { font-size: 12.5px; font-weight: 600; color: #5d6b63; margin-right: 2px; }
.mj-chip {
  height: 27px; padding: 0 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border, #d5ddd5); background: #fff; color: #33443b;
  font-size: 13px; font-family: inherit; line-height: 1;
  transition: background-color .15s, border-color .15s, color .15s;
}
.mj-chip:hover:not(:disabled) { background: var(--accent, #eef5f0); }
.mj-chip.on {
  background: var(--primary, #1d4d3c); border-color: var(--primary, #1d4d3c);
  color: #fff; font-weight: 600;
}
.mj-chip:disabled { opacity: .35; cursor: not-allowed; }

/* 自家座位选择行 */
.mj-sc-seatrow { border-bottom: none; padding-bottom: 0; margin-bottom: 2px; }
.mj-sc-seatnote { font-size: 12px; color: #8a9790; margin-left: 2px; }

/* 点数对照：可横向滚动，当前座位高亮 */
.mj-sc-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mj-sc-contrast th.on { color: #1d4d3c; background: #e6f0ea; }
.mj-sc-contrast td.on { color: #1d4d3c; background: #f2f8f4; font-weight: 700; }
.mj-sc-contrast td.on b { color: #14503a; }
.mj-sc-ura { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #33443b; }
.mj-sc-ura input {
  width: 50px; height: 27px; padding: 0 6px; text-align: center;
  border: 1px solid var(--border, #d5ddd5); border-radius: 6px;
  font-family: inherit; font-size: 13px; color: inherit; background: #fff;
}
.mj-sc-ura input:disabled { opacity: .35; }

.mj-sc-sub { font-size: 13px; color: #33443b; margin: 3px 0 9px; }
.mj-sc-note {
  font-size: 13.5px; color: #8a5a12; background: #fff8e8;
  border: 1px solid #f0dfb8; border-radius: 8px; padding: 9px 11px; margin-top: 9px;
}

/* ---------- 表格 ---------- */
.mj-sc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.mj-sc-table th {
  text-align: left; font-weight: 600; font-size: 12.5px; color: #5d6b63;
  padding: 7px 7px; border-bottom: 1px solid var(--border, #d5ddd5);
  white-space: nowrap; background: #fbfdfb;
}
.mj-sc-table td {
  padding: 7px; border-bottom: 1px solid #eef2ee; vertical-align: middle;
}
.mj-sc-table tr:last-child td { border-bottom: none; }
.mj-sc-table tbody tr:hover td { background: #fafcf9; }
.mj-sc-num { white-space: nowrap; font-weight: 600; }
.mj-sc-num b { font-weight: 700; color: var(--primary, #1d4d3c); }
.mj-sc-c-tile { white-space: nowrap; }
.mj-sc-tw { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }

/* 庄家 / 子家 点数对照表 */
.mj-sc-contrast { margin-top: 4px; font-size: 12.5px; }
.mj-sc-contrast th { background: #f4f6f3; font-size: 11.5px; color: #8a9790; }
.mj-sc-contrast .mj-sc-num { font-weight: 500; color: #5d6b63; }
.mj-sc-contrast .mj-sc-num b { color: #1d4d3c; }
.mj-sc-contrast td { padding: 5px 7px; }
.mj-sc-c-tile span { font-weight: 600; }
.mj-sc-c-limit { white-space: nowrap; color: #8a5a12; font-weight: 600; }
.mj-sc-c-yaku { min-width: 200px; }
.mj-sc-tile { height: 34px; width: auto; vertical-align: middle; border-radius: 4px; }

.mj-sc-yaku {
  display: inline-block; margin: 0 5px 3px 0; padding: 2px 7px;
  background: #f3f7f3; border: 1px solid #e2eae2; border-radius: 5px;
  font-size: 12.5px; white-space: nowrap;
}
.mj-sc-yaku i { font-style: normal; font-weight: 700; margin-left: 5px; color: var(--primary, #1d4d3c); }
.mj-sc-dora { background: #fdf4e6; border-color: #f0e0c4; }
.mj-sc-dora i { color: #a8641a; }
.mj-sc-tsumo-yaku { background: #eef4fb; border-color: #d8e4f2; }
.mj-sc-tsumo-yaku i { color: #1f5c99; }
.mj-sc-mute { color: #8b9a92; font-size: 12.5px; }
.mj-sc-legend { margin-top: 9px; font-size: 12px; color: #8b9a92; }

/* ---------- 打牌分组 ---------- */
.mj-sc-group { margin-top: 11px; padding-top: 9px; border-top: 1px dashed #e7eee7; }
.mj-sc-group:first-of-type { border-top: none; }
.mj-sc-gh { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 6px; }
.mj-sc-dt { font-size: 12.5px; color: #5d6b63; }
.mj-sc-dn { font-weight: 700; margin-right: 2px; }
.mj-sc-best {
  margin-left: auto; font-size: 12.5px; font-weight: 700;
  color: var(--primary, #1d4d3c);
  background: color-mix(in oklch, var(--primary, #1d4d3c) 9%, #fff);
  border-radius: 999px; padding: 2px 9px;
}

@media (max-width: 640px) {
  .mj-sc { padding: 11px; font-size: 13.5px; }
  .mj-sc-title { font-size: 15.5px; }
  .mj-sc-table { font-size: 13px; }
  .mj-sc-table th { font-size: 11.5px; }
  .mj-sc-c-yaku { min-width: 130px; }
  .mj-sc-tile { height: 28px; }
  .mj-sc-yaku { font-size: 11.5px; }
  .mj-dora-hint { font-size: 11px; padding-left: 8px; }
  .mj-dh-tile { height: 22px; }
}
