/* ===== 概率猎手 - 练习工具 ===== */
:root {
  --bg: #ffffff;
  --bg-panel: #f7f8fa;
  --bg-card: #ffffff;
  --text: #16181d;
  --text-dim: #5f6b7a;
  --accent: #e94560;
  --accent2: #533483;
  --red: #e94560;
  --blue: #2563eb;
  --green: #1f9d55;
  --gold: #b8860b;
  --border: #e3e6ea;
  --btn-bg: #f0f2f5;
  --btn-hover: #e4e8ee;
  --danger: #c0392b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

#app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ===== Header ===== */
#topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  background: var(--bg-panel);
  border-radius: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.logo { font-size: 18px; font-weight: 700; color: var(--gold); letter-spacing: 1px; }
.topbar-right { display: flex; gap: 8px; }

/* ===== Buttons ===== */
.btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--btn-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  transition: background .2s, border-color .2s;
}
.btn:hover { background: var(--btn-hover); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #d63850; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-close { background: none; border: none; color: var(--text-dim); font-size: 24px; cursor: pointer; }

/* ===== Main Layout ===== */
#main-content {
  display: flex;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

/* ===== Road Panel ===== */
#road-panel {
  flex: 1;
  background: var(--bg-panel);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.panel-title { font-size: 14px; font-weight: 600; color: var(--text-dim); }
.road-tabs { display: flex; gap: 4px; }
.road-tab {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
  transition: all .2s;
}
.road-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.road-tab:hover:not(.active) { background: var(--btn-hover); }

#road-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: auto;
}
#road-canvas { display: block; }

/* ===== Right Panel ===== */
#right-panel {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

/* Progress */
#progress-section {
  background: var(--bg-panel);
  border-radius: 8px;
  padding: 8px 14px;
}
.progress-info { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); transition: width .3s; border-radius: 3px; }

/* Result Display */
#result-display {
  background: var(--bg-panel);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
#last-result {
  font-size: 42px;
  font-weight: 900;
  width: 64px; height: 64px;
  line-height: 64px;
  border-radius: 50%;
  margin: 0 auto 4px;
  border: 3px solid transparent;
}
#last-result.result-a { color: var(--red); border-color: var(--red); }
#last-result.result-b { color: var(--blue); border-color: var(--blue); }
#last-result.result-hidden { color: var(--text-dim); border-color: var(--border); font-size: 20px; }
#result-label { font-size: 12px; color: var(--text-dim); }

/* Bet Controls */
#bet-controls {
  background: var(--bg-panel);
  border-radius: 8px;
  padding: 10px;
}
.bet-row { display: flex; gap: 6px; margin-bottom: 8px; }
.bet-btn {
  flex: 1;
  padding: 8px 6px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.bet-btn:disabled { opacity: .4; cursor: not-allowed; }
.bet-btn:not(:disabled):hover { transform: translateY(-2px); }
.bet-icon { font-size: 18px; font-weight: 900; }
.bet-label { font-size: 9px; color: var(--text-dim); letter-spacing: 1px; }
.bet-a:not(:disabled):hover { border-color: var(--red); box-shadow: 0 0 12px rgba(233,68,96,.3); }
.bet-b:not(:disabled):hover { border-color: var(--blue); box-shadow: 0 0 12px rgba(37,99,235,.3); }
.bet-skip:not(:disabled):hover { border-color: var(--gold); box-shadow: 0 0 12px rgba(240,192,64,.3); }
.bet-a.selected { border-color: var(--red); background: rgba(233,68,96,.15); }
.bet-b.selected { border-color: var(--blue); background: rgba(37,99,235,.15); }
.bet-skip.selected { border-color: var(--gold); background: rgba(240,192,64,.15); }

.unit-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.unit-label { font-size: 12px; color: var(--text-dim); margin-right: 4px; }
.unit-btn {
  flex: 1;
  padding: 4px 3px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--btn-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  transition: all .15s;
}
.unit-btn.active { background: var(--accent2); border-color: var(--accent2); }
#unit-custom { font-weight: 700; color: var(--gold); }
.unit-btn:hover:not(.active) { background: var(--btn-hover); }
/* Reason row */
.reason-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.reason-label {
  font-size: 12px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.reason-input {
  flex: 1;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  outline: none;
  font-family: inherit;
  min-width: 0;
}
.reason-input:focus { border-color: var(--accent); }
.reason-input::placeholder { color: var(--text-dim); opacity: .5; }
.reason-input.confirmed { border-color: var(--success); background: rgba(46,204,113,.08); }
.btn-confirm-reason {
  flex-shrink: 0;
  padding: 5px 10px;
  font-size: 12px;
}
.btn-confirm-reason.confirmed {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.action-row { display: flex; gap: 8px; }
.action-row .btn { flex: 1; }

/* Stats */
#stats-panel {
  background: var(--bg-panel);
  border-radius: 8px;
  padding: 10px 12px;
  flex-shrink: 0;
}
.stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
.stat-item {
  text-align: center;
  padding: 5px 3px;
  background: var(--bg-card);
  border-radius: 6px;
}
.stat-value { font-size: 15px; font-weight: 700; display: block; }
.stat-label { font-size: 9px; color: var(--text-dim); }

/* ===== History Panel ===== */
#history-panel {
  background: var(--bg-panel);
  border-radius: 8px;
  margin-top: 8px;
  padding: 8px 14px;
  flex-shrink: 0;
  max-height: 140px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#history-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-content: flex-start;
  padding: 4px 0;
}
.history-item {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-family: monospace;
  white-space: nowrap;
}
.history-item.win { background: rgba(46,204,113,.2); color: var(--green); }
.history-item.loss { background: rgba(233,68,96,.2); color: var(--red); }
.history-item.skip { background: rgba(136,153,170,.15); color: var(--text-dim); }
.history-item.pending { background: rgba(240,192,64,.15); color: var(--gold); }

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal.hidden { display: none; }
.modal-content {
  background: var(--bg-panel);
  border-radius: 12px;
  width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
}
.modal-footer { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
#review-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 18px;
}
.review-item {
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background .2s;
}
.review-item:hover { background: var(--btn-hover); }
.review-item .review-date { font-size: 11px; color: var(--text-dim); }
.review-item .review-summary { font-size: 13px; margin-top: 3px; }
.review-detail {
  margin-top: 8px;
  padding: 8px;
  background: var(--bg);
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
  max-height: 200px;
  overflow-y: auto;
}
.review-detail .detail-row { margin: 2px 0; }
.review-detail .detail-row.w { color: var(--green); }
.review-detail .detail-row.l { color: var(--red); }
.review-detail .detail-row.s { color: var(--text-dim); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c9ced6; }

/* ===== Import Modal ===== */
.modal-body { padding: 14px 18px; overflow-y: auto; }
.import-section { margin-bottom: 10px; }
.import-section-title { font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 8px; }
.import-dropzone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
}
.import-dropzone:hover { border-color: var(--accent); background: rgba(233,68,96,.05); }
.import-dropzone.dragover { border-color: var(--green); background: rgba(46,204,113,.08); }
.dropzone-icon { font-size: 28px; }
.import-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: var(--text-dim);
  font-size: 11px;
}
.import-divider::before, .import-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.import-url-row { display: flex; gap: 8px; }
.import-input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.import-input:focus { border-color: var(--accent); }
.import-textarea {
  width: 100%;
  height: 120px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  font-family: monospace;
  resize: vertical;
  outline: none;
  margin-bottom: 8px;
}
.import-textarea:focus { border-color: var(--accent); }
.import-status { font-size: 12px; flex: 1; }
.import-status.success { color: var(--green); }
.import-status.error { color: var(--red); }

/* ===== Analytics Modal ===== */
.analytics-content { width: 90vw; max-width: 960px; max-height: 85vh; display: flex; flex-direction: column; }
.analytics-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); padding: 0 18px; flex-shrink: 0; }
.analytics-tab { padding: 10px 18px; border: none; background: transparent; color: var(--text-dim); cursor: pointer; font-size: 13px; border-bottom: 2px solid transparent; transition: all .2s; font-family: inherit; }
.analytics-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.analytics-tab:hover:not(.active) { color: var(--text); }
.analytics-body { flex: 1; overflow-y: auto; padding: 16px 18px; }

/* Summary cards */
.analytics-summary { display: flex; gap: 10px; flex-wrap: wrap; }
.analytics-card { flex: 1; min-width: 120px; background: var(--bg-card); border-radius: 8px; padding: 14px; text-align: center; }
.analytics-card .card-value { font-size: 28px; font-weight: 700; }
.analytics-card .card-label { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* Section title */
.analytics-section { margin-top: 20px; }
.analytics-section-title { font-size: 14px; font-weight: 600; color: var(--text-dim); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }

/* Tables */
.analytics-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.analytics-table th { text-align: left; padding: 8px 12px; color: var(--text-dim); font-weight: 600; font-size: 11px; border-bottom: 1px solid var(--border); }
.analytics-table td { padding: 6px 12px; border-bottom: 1px solid rgba(0,0,0,.05); }
.analytics-table tr:hover td { background: rgba(0,0,0,.03); }
.ar { text-align: right !important; }
.fw { font-weight: 600; }
.dim { color: var(--text-dim); font-size: 11px; }

/* Bar charts */
.bar-chart { height: 18px; background: rgba(0,0,0,.06); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; transition: width .4s; min-width: 0; }
.bar-fill.green { background: #2ecc71; }
.bar-fill.red { background: #e94560; }
.bar-fill.gold { background: #b8860b; }
.bar-fill.blue { background: #4ea8f6; }
.bar-inline { display: inline-block; width: 50px; height: 6px; background: rgba(0,0,0,.08); border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.bar-inline-fill { display: block; height: 100%; border-radius: 2px; background: #b8860b; }

/* Side analysis */
.side-compare { display: flex; gap: 14px; margin-bottom: 10px; }
.side-card { flex: 1; background: var(--bg-card); border-radius: 8px; padding: 14px; }
.side-card-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.side-bar-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.side-bar-label { width: 24px; font-size: 12px; color: var(--text-dim); text-align: center; flex-shrink: 0; }
.side-bar-val { width: 48px; font-size: 13px; font-weight: 600; text-align: right; flex-shrink: 0; }
.pts-chart { background: rgba(0,0,0,.05); }

/* Tilt rows */
.tilt-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.tilt-label { width: 60px; font-size: 12px; color: var(--text-dim); flex-shrink: 0; }
.tilt-val { width: 90px; font-size: 12px; text-align: right; flex-shrink: 0; font-weight: 600; }

/* Trend */
.trend-summary { font-size: 14px; padding: 8px 0 14px; text-align: center; }

/* Stacked bar */
.stacked-bar { display: flex; height: 24px; border-radius: 4px; overflow: hidden; }
.stacked-seg { min-width: 2px; }
.stacked-legend { display: flex; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.legend-item { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 4px; }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* Insights */
.insight-item { padding: 8px 12px; margin: 6px 0; background: rgba(184,134,11,.08); border-left: 3px solid #b8860b; border-radius: 0 6px 6px 0; font-size: 13px; line-height: 1.5; }

/* Empty state */
.analytics-empty { text-align: center; color: var(--text-dim); padding: 40px 20px; font-size: 14px; }

/* Green/red text helpers */
.green { color: #2ecc71; }
.red { color: #e94560; }

/* ===== Review Shoe Modal ===== */
.review-shoe-content {
  width: 820px;
  max-width: 95vw;
}
.review-body {
  padding: 10px 14px;
  overflow-y: auto;
}
.review-summary-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: 8px;
  font-size: 12px;
}
.review-summary-stats .rs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
}
.review-summary-stats .rs-val {
  font-size: 16px;
  font-weight: 700;
}
.review-summary-stats .rs-lbl {
  font-size: 9px;
  color: var(--text-dim);
}
.review-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
  padding-left: 2px;
}

/* Big Road Grid */
.big-road-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 2px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}
.big-road-grid {
  display: flex;
  gap: 3px;
  justify-content: center;
  min-width: min-content;
  padding: 4px;
}
.big-road-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
}
.br-cell {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Consolas', 'Microsoft YaHei', monospace;
  cursor: default;
  position: relative;
  transition: transform .15s, box-shadow .15s;
  flex-shrink: 0;
}
.br-cell:hover {
  transform: scale(1.15);
  z-index: 2;
  box-shadow: 0 0 10px rgba(0,0,0,.18);
}

/* Cell types */
.br-cell-a {
  background: #c0392b;
  color: #fff;
}
.br-cell-b {
  background: #2471a3;
  color: #fff;
}
.br-cell-skip {
  opacity: .4;
}

/* Point signal cell: colored bg replaces A/B color */
.br-cell-point {
  color: #fff;
  font-size: 16px;
  box-shadow: 0 0 6px rgba(0,0,0,.15);
}
.br-cell-point .br-letter {
  font-size: 18px;
  font-weight: 900;
}
.br-cell-point .br-side {
  font-size: 9px;
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  opacity: .85;
}

/* Bet result overlay */
.br-bet-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}
.br-bet-badge.win {
  background: #2ecc71;
  color: #fff;
}
.br-bet-badge.loss {
  background: #e94560;
  color: #fff;
}
.br-bet-badge.skip-badge {
  background: rgba(136,153,170,.6);
  color: #fff;
  font-size: 8px;
}

/* Hover tooltip */
.br-cell[data-reason]:hover::after {
  content: attr(data-reason);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: #e0e0e0;
  font-size: 11px;
  font-weight: 400;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10;
  border: 1px solid var(--border);
  pointer-events: none;
}

/* Point legend */
.review-point-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 6px 10px;
  font-size: 11px;
}
.review-point-legend .rpl-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.review-point-legend .rpl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}
.review-point-legend .rpl-dot.legend-no-point {
  border: 2px solid #c0392b;
  background: transparent;
}
.review-point-legend .rpl-dot.legend-no-point.b-side {
  border-color: #2471a3;
}

/* Point summary */
.review-point-summary {
  margin-top: 4px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: 8px;
}
.review-point-summary .rp-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.review-point-summary .rp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
}
.review-point-summary .rp-card {
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg);
  font-size: 12px;
}
.review-point-summary .rp-card .rpc-type {
  font-weight: 700;
  font-size: 13px;
}
.review-point-summary .rp-card .rpc-stat {
  color: var(--text-dim);
  margin-top: 2px;
}

/* ===== Judgment Card Modal ===== */
.judgment-card-content { width: 520px; max-height: 85vh; overflow-y: auto; }
.jcard-body { padding: 0 8px; font-size: 13px; }
.jcard-subtitle { text-align: center; color: var(--text-dim); font-size: 12px; margin-bottom: 14px; }
.jcard-section { margin-bottom: 14px; }
.jcard-section-title { font-size: 14px; font-weight: 700; color: var(--gold); margin-bottom: 8px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.jcard-defs { font-size: 12px; color: var(--text-dim); line-height: 1.7; }
.jcard-defs strong { color: var(--text); }
.jcard-table { width: 100%; font-size: 12px; border-collapse: collapse; margin-bottom: 6px; }
.jcard-table th { text-align: left; color: var(--text-dim); font-weight: 400; padding: 3px 6px; border-bottom: 1px solid var(--border); }
.jcard-table td { padding: 3px 6px; border-bottom: 1px solid rgba(0,0,0,.05); }
.jcard-tier { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; margin-right: 4px; }
.jcard-tier-good { background: rgba(31,157,85,.12); color: var(--green); }
.jcard-tier-mid { background: rgba(184,134,11,.12); color: var(--gold); }
.jcard-tier-bad { background: rgba(233,69,96,.12); color: var(--red); }
.jcard-hr-good { color: var(--green); font-weight: 700; }
.jcard-hr-mid { color: var(--gold); font-weight: 700; }
.jcard-hr-bad { color: var(--red); font-weight: 700; }
.jcard-pos { color: var(--green); }
.jcard-neg { color: var(--red); }
.jcard-flow { font-size: 12px; line-height: 1.8; }
.jcard-branch { color: var(--text-dim); }
.jcard-result { font-weight: 700; }
.jcard-result.jcard-good { color: var(--green); }
.jcard-result.jcard-mid { color: var(--gold); }
.jcard-result.jcard-bad { color: var(--red); }
.jcard-summary { background: rgba(240,192,64,.08); border: 1px solid rgba(240,192,64,.2); border-radius: 8px; padding: 8px; text-align: center; font-size: 13px; font-weight: 700; color: var(--gold); margin-top: 4px; }
.btn-gold { background: rgba(240,192,64,.15); color: var(--gold); border-color: rgba(240,192,64,.3); }
.btn-gold:hover { background: rgba(240,192,64,.25); }

/* ===== 登录/注册覆盖层 (白底) ===== */
.hidden { display: none !important; }
.auth-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(255,255,255,.97);
  display: flex; align-items: center; justify-content: center;
}
.auth-card {
  width: 340px; max-width: 92vw;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px; padding: 28px 26px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.08);
}
.auth-title { text-align: center; font-size: 18px; font-weight: 700; color: #111827; }
.auth-input {
  width: 100%; box-sizing: border-box;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 8px; padding: 11px 12px;
  color: #111827; font-size: 14px; outline: none;
}
.auth-input:focus { border-color: #2563eb; }
.auth-btn {
  width: 100%; padding: 11px; border: none; border-radius: 8px;
  background: #2563eb; color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer;
}
.auth-btn:hover { filter: brightness(1.1); }
.auth-switch { text-align: center; font-size: 13px; color: #6b7280; }
.auth-switch a { color: #2563eb; cursor: pointer; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.auth-error {
  background: #fef2f2; border: 1px solid #fecaca;
  color: #dc2626; border-radius: 8px; padding: 9px 12px;
  font-size: 13px; text-align: center;
}


