body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #f5f5f5;
  color: #222;
}

header {
  background: #111;
  color: white;
  padding: 16px;
}

h1 {
  margin: 0;
  font-size: 22px;
}

.sub {
  font-size: 13px;
  opacity: 0.8;
}

main {
  padding: 14px;
}

.controls {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

input, select, button {
  padding: 10px;
  font-size: 15px;
}

button {
  border: none;
  border-radius: 8px;
  background: #111;
  color: white;
}

.race-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.race-card {
  background: white;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
  cursor: pointer;
}

.race-card .label {
  font-weight: bold;
  font-size: 18px;
}

.race-card .name {
  font-size: 12px;
  margin-top: 4px;
  color: #555;
}

.badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ffe08a;
  font-size: 12px;
  font-weight: bold;
}

.race-detail {
  margin-top: 18px;
  background: white;
  border-radius: 12px;
  padding: 14px;
}

.hidden {
  display: none;
}

.horse {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.horse-main {
  font-weight: bold;
}

.rank {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  border-radius: 6px;
  background: #111;
  color: white;
  margin-right: 6px;
}

.index {
  color: #d35400;
  font-weight: bold;
}

.section-block {
  margin-bottom: 18px;
}

.section-block h2 {
  font-size: 18px;
  margin: 8px 0 10px;
}

.recommend-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recommend-card {
  background: white;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.recommend-race-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
}

.recommend-horse {
  padding: 8px 0;
  border-top: 1px solid #eee;
  cursor: pointer;
}

.recommend-horse:first-of-type {
  border-top: none;
}

.recommend-main {
  font-weight: bold;
}

.recommend-comment {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.empty-message {
  background: white;
  border-radius: 12px;
  padding: 12px;
  color: #666;
}

.page {
  display: none;
  padding-bottom: 80px;
}

.page.active {
  display: block;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: white;
  border-top: 1px solid #ddd;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 100;
}

.nav-btn {
  background: white;
  color: #555;
  border: none;
  border-radius: 0;
  font-size: 13px;
  font-weight: bold;
}

.nav-btn.active {
  background: #111;
  color: white;
}

.info-card {
  background: white;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
  line-height: 1.7;
}

.horse-recommend {
  background: #fff8e6;
  margin-left: -6px;
  margin-right: -6px;
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 8px;
}

.sort-box {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.sort-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  background: #eee;
  color: #333;
  border: none;
  font-weight: bold;
}

.sort-btn.active {
  background: #111;
  color: white;
}

.rank.normal {
  background: #ccc;
  color: #333;
}

.horse-recommend {
  background: #fff8e6;
  margin-left: -6px;
  margin-right: -6px;
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 8px;
}

.explain-card {
  background: #f0f0f0;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  margin: 12px 0;
  color: #333;
}

.pick-block {
  margin-top: 14px;
}

.pick-block h3 {
  margin-bottom: 8px;
}

.pick-card {
  background: white;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.main-pick-card {
  border-left: 5px solid #111;
}

.recommend-pick-card {
  border-left: 5px solid #d35400;
}

.pick-title {
  font-weight: bold;
  font-size: 16px;
}

.mark-main {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  border-radius: 6px;
  background: #111;
  color: white;
  margin-right: 6px;
  font-weight: bold;
}

.mark-main.small {
  font-size: 13px;
}

.horse-main-pick {
  background: #eef2ff;
  margin-left: -6px;
  margin-right: -6px;
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 8px;
}

.admin-box {
  background: white;
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.admin-box label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
  font-size: 14px;
}

.admin-box input,
.admin-box select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin-top: 4px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: normal !important;
}

.check-row input {
  width: auto;
}

.primary-btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #111;
  color: white;
  font-weight: bold;
  font-size: 15px;
}

.admin-status {
  margin-top: 14px;
}

.admin-status pre {
  background: #111;
  color: #eee;
  padding: 12px;
  border-radius: 10px;
  overflow-x: auto;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.5;
}

.race-action-box {
  background: white;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.odds-update-btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px;
  background: #111;
  color: white;
  font-weight: bold;
  font-size: 15px;
}

.odds-update-btn:disabled {
  background: #777;
}

.odds-update-note {
  margin-top: 8px;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}
.odds-time-card {
  background: #fff7e6;
  border-left: 5px solid #f39c12;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.6;
  color: #333;
}
.admin-divider {
  margin: 20px 0;
  border: none;
  border-top: 1px solid #ddd;
}
.public-refresh-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;

  padding: 9px 13px;
  border: none;
  border-radius: 999px;

  background: #111827;
  color: #ffffff;

  font-size: 13px;
  font-weight: 700;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.public-refresh-btn:disabled {
  opacity: 0.6;
}
.public-updated-at {
  margin: 8px 0 12px;
  padding: 8px 10px;

  border-radius: 10px;
  background: #f3f4f6;
  color: #374151;

  font-size: 13px;
  line-height: 1.5;
}

.public-updated-at .note {
  color: #6b7280;
  font-size: 12px;
}