.ocs-auth-status {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  line-height: 1.45;
}

.ocs-auth-status.is-guest {
  color: #c2410c;
}

.ocs-auth-status.is-user {
  color: #1d4ed8;
}

.ocs-home-split {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e5e7eb;
}

.ocs-home-split .rec-section-title {
  margin-top: 0;
  margin-bottom: 12px;
}

.ocs-joined-title {
  margin-top: 48px;
  padding-top: 8px;
}

.ocs-sum-warn.show {
  display: flex;
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.ocs-busy {
  opacity: 0.65;
  pointer-events: none;
}

.ocs-code-line {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: #1d4ed8;
}

.ocs-status-line {
  margin: 0 0 8px;
  font-size: 14px;
  color: #64748b;
}

.ocs-draft-hint {
  margin: 10px 0 8px;
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
}

.ocs-table-legend {
  margin: 0 0 8px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.ocs-table-wrap {
  margin: 8px 0 4px;
  border: 1px solid #ddd;
  border-radius: 0;
  background: #fff;
  /* 不设 overflow，避免表内滚动容器抢走整页下拉手势 */
  overflow: visible;
}

#board-view .ocs-sum-warn,
#board-view #board-error {
  margin-top: 8px;
  margin-bottom: 8px;
}

.ocs-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  font-size: 14px;
}

/* 只画右/下边，与外框连成单线网格，避免每格四边叠成双线 */
.ocs-table th,
.ocs-table td {
  padding: 0 4px;
  height: 40px;
  text-align: center;
  vertical-align: middle;
  border: none;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
  background: #fff;
  background-clip: padding-box;
  box-sizing: border-box;
}

.ocs-table th:last-child,
.ocs-table td:last-child {
  border-right: none;
}

.ocs-table tbody tr:last-child td {
  border-bottom: none;
}

.ocs-table td.ocs-round-no,
.ocs-table td.ocs-round-sum {
  padding: 0 1px;
  font-size: 12px;
  font-weight: 600;
}

.ocs-table td.ocs-round-no {
  color: #64748b;
}

.ocs-table .is-pos {
  color: #dc2626;
  font-weight: 700;
}

.ocs-table .is-neg {
  color: #16a34a;
  font-weight: 700;
}

.ocs-table .is-zero {
  color: #2563eb;
  font-weight: 700;
}

.ocs-table .ocs-pending {
  color: #94a3b8;
}

.ocs-table tr.ocs-draft-row td {
  background: #fffbeb;
}

.ocs-table tfoot td {
  /* 表已全展开，不再 sticky，避免盖住下方「本局分数」 */
  position: static;
  border-right: none;
  box-shadow: inset -1px 0 0 #ddd;
}

.ocs-table tfoot td:last-child {
  box-shadow: none;
}

.ocs-table tfoot tr.ocs-foot-names td {
  background: #f9fafb;
  font-weight: 600;
  color: #334155;
  border-bottom: none;
}

.ocs-table tfoot tr.ocs-foot-total td {
  background: #fff;
  font-weight: 700;
  color: #111827;
  box-shadow: inset 0 1px 0 #ddd, inset -1px 0 0 #ddd;
}

.ocs-table tfoot tr.ocs-foot-total td:last-child {
  box-shadow: inset 0 1px 0 #ddd;
}

.ocs-table tfoot td.ocs-foot-label {
  color: #374151;
  font-weight: 500;
  font-size: 13px;
  background: #f9fafb;
}

.ocs-table tfoot tr.ocs-foot-total td.ocs-foot-label {
  background: #f9fafb;
}

.ocs-table .ocs-name-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  padding: 0 1px;
}

.ocs-round-form .rec-field {
  margin-bottom: 12px;
}

.ocs-round-form .ocs-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ocs-submit-row {
  margin-bottom: 4px;
}

.ocs-score-input {
  caret-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.ocs-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.ocs-badge.is-open,
.ocs-badge.is-playing {
  color: #1d4ed8;
  background: #dbeafe;
}

.ocs-badge.is-finished {
  color: #64748b;
  background: #f1f5f9;
}

.ocs-game-item .rec-item-meta {
  font-size: 14px;
}

.ocs-score-input.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  background: #eff6ff;
}

.ocs-keyboard {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  transform: translateY(110%);
  transition: transform 0.22s ease;
  pointer-events: none;
}

.ocs-keyboard.is-open {
  transform: translateY(0);
  pointer-events: auto;
}

.ocs-keyboard-panel {
  background: #f7f7f7;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.ocs-keyboard-header {
  background: #fff;
  height: 36px;
  line-height: 36px;
  text-align: center;
  font-size: 14px;
  margin-bottom: 6px;
  border-radius: 8px;
  position: relative;
  color: #374151;
}

.ocs-keyboard-close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  padding: 0 8px;
}

.ocs-key-row {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
}

.ocs-key-row:last-child {
  margin-bottom: 0;
}

.ocs-key {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.ocs-key:active {
  background: #eee;
}

.ocs-remove-local {
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  vertical-align: middle;
}

.ocs-remove-local:hover {
  color: #dc2626;
}

/* 记分板：手机端收紧边距，表格尽量铺满 */
@media (max-width: 768px) {
  body.ocs-board-active .content {
    padding: 4px;
  }

  body.ocs-board-active #board-view.tool-card {
    margin: 0;
    padding: 8px 4px 12px;
    border-radius: 0;
    box-shadow: none;
  }

  body.ocs-board-active .ocs-table-wrap {
    margin: 8px 0 12px;
    border-radius: 0;
  }

  body.ocs-board-active .ocs-table {
    font-size: 13px;
  }

  body.ocs-board-active .ocs-table td,
  body.ocs-board-active .ocs-table th {
    padding: 0 1px;
  }

  body.ocs-board-active .ocs-round-form .ocs-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.ocs-board-active .rec-toolbar {
    gap: 6px;
    flex-wrap: wrap;
  }
}


