:root {
  --bg: #fafafa;
  --bar: #1d1f21;
  --line: #e0e0e0;
  --accent: #ff6600;
  --tap: 44px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: #1d1f21;
}

.ge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bar);
  color: #fff;
}

.ge-header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.ge-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.ge-status {
  margin: 8px 12px;
  font-size: 13px;
  color: #555;
}

.ge-error {
  margin: 4px 12px;
  font-size: 13px;
  color: #c62828;
  min-height: 1.2em;
}

.ge-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.ge-tab {
  min-width: 44px;
  min-height: var(--tap);
  padding: 0 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fafafa;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.ge-tab-active {
  border-color: var(--accent);
  background: #fff5eb;
  color: var(--accent);
}

.ge-table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  max-width: 100vw;
}

.ge-race-table {
  border-collapse: collapse;
  font-size: 11px;
  min-width: max-content;
  background: #fff;
  border: 1px solid var(--line);
}

.ge-race-table th,
.ge-race-table td {
  border: 1px solid #eee;
  padding: 4px 6px;
  vertical-align: top;
}

.ge-race-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f0f0f0;
  font-weight: 600;
  white-space: nowrap;
}

.ge-td-basic {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.06);
  min-width: 140px;
}

.ge-row-reserve td {
  background: #fafafa;
  color: #9e9e9e;
}

/* 基本出賽詳情 */
.ge-basic-row1 {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}
.ge-basic-no {
  flex-shrink: 0;
  width: 1.4em;
}
.ge-basic-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ge-odd-box {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}
.ge-odd-win {
  background: #ffebee;
  color: #c62828;
}
.ge-odd-pla {
  background: #e3f2fd;
  color: #1565c0;
}
.ge-odd-hot {
  outline: 2px solid var(--accent);
}
.ge-basic-row2 {
  margin-top: 2px;
  font-size: 10px;
  color: #757575;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 賽事詳情 */
.ge-race-cell {
  min-width: 200px;
  max-width: 280px;
}
.ge-race-row1 {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 6px;
  align-items: baseline;
  line-height: 1.35;
}
.ge-rank-top3 {
  color: #c62828;
  font-weight: 800;
}
.ge-jockey-diff {
  color: #e65100;
  font-weight: 700;
}
.ge-course-mud {
  font-weight: 700;
  border-bottom: 2px solid #795548;
}
.ge-course-green {
  font-weight: 700;
  border-bottom: 2px solid #388e3c;
}
.ge-race-row2 {
  margin-top: 4px;
  font-size: 10px;
  color: #616161;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.ge-tag-pace-fast {
  color: #2e7d32;
  font-weight: 700;
}
.ge-tag-pace-slow {
  color: #c62828;
  font-weight: 700;
}
.ge-tag-at {
  background: #fff3e0;
  color: #e65100;
  padding: 0 3px;
  border-radius: 2px;
}

/* column 模組（ge-col- 前綴）Top5 樣式 */
.ge-col-top5-container {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ge-col-top5-number {
  font-variant-numeric: tabular-nums;
}
.ge-col-top5-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.ge-col-rank-top3 {
  color: #c62828;
  font-weight: 800;
}
.ge-col-diff-green-bold {
  color: #2e7d32;
  font-weight: 700;
}

.ge-td-left {
  text-align: left;
}
.ge-td-center {
  text-align: center;
}
.ge-td-right {
  text-align: right;
}

.ge-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.ge-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ge-toolbar select,
.ge-toolbar input[type="number"] {
  min-height: 32px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid #ccc;
}
.ge-btn-toggle {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fafafa;
  font-weight: 600;
  cursor: pointer;
}
.ge-btn-toggle-active {
  border-color: var(--accent);
  background: #fff5eb;
  color: var(--accent);
}
.ge-standard-box {
  flex: 1 1 200px;
  font-size: 11px;
  line-height: 1.35;
  color: #333;
  max-height: 4.5em;
  overflow: auto;
}
.ge-trial-cell { font-size: 10px; line-height: 1.35; }
.ge-trial-link { color: inherit; text-decoration: none; }
.ge-statics-cell { display: flex; flex-direction: column; gap: 2px; min-width: 72px; }
.ge-statics-bar { display: block; font-size: 9px; background: #eee; border-radius: 2px; overflow: hidden; }
.ge-statics-fill { display: block; background: #90caf9; color: #1565c0; padding: 0 2px; }
.ge-statics-bar-c .ge-statics-fill { background: #ffcc80; color: #e65100; }
