:root {
  color-scheme: light;
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", Arial, sans-serif;
  --blue: #173b86;
  --blue-2: #2453ae;
  --ink: #162033;
  --muted: #657086;
  --line: #d9dee8;
  --row: #f6f7fa;
  --panel: #ffffff;
  --wash: #eef3f8;
  --yellow: #ffd21f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f3f6fa 0%, #e6ebf1 100%);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto;
}

.bet-panel {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(22, 32, 51, 0.12);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: var(--blue);
  color: #fff;
}

.eyebrow {
  margin: 0 0 4px;
  color: #cddaf5;
  font-size: 14px;
}

h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.summary-strip {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.stake-field,
.metric {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: #fff;
}

.stake-field span,
.metric span {
  color: var(--muted);
  font-weight: 700;
}

.stake-field input {
  width: 110px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #aab3c1;
  border-radius: 4px;
  text-align: right;
  font-size: 20px;
  font-weight: 700;
}

.metric strong {
  font-size: 24px;
  color: var(--blue);
}

.tools-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px 20px;
  background: var(--wash);
  border-bottom: 1px solid var(--line);
}

button {
  height: 42px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

.tools-row button,
.ghost-button {
  background: #fff;
  color: var(--blue);
  border: 1px solid #b8c5db;
}

.ghost-button {
  width: 88px;
}

.primary-button {
  width: 132px;
  background: var(--yellow);
  color: #17233d;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  height: 48px;
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid #edf0f5;
}

th {
  background: #f9fbfe;
  color: #4f5d75;
  font-size: 15px;
  font-weight: 800;
}

tbody tr:nth-child(odd) {
  background: #fff;
}

tbody tr:nth-child(even) {
  background: var(--row);
}

th:first-child,
td:first-child {
  width: 72px;
  font-weight: 800;
}

th:last-child,
td:last-child {
  width: 150px;
  text-align: left;
  color: var(--blue);
  font-weight: 800;
}

.pick {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
}

.pick input {
  width: 22px;
  height: 22px;
  accent-color: var(--blue-2);
  cursor: pointer;
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
}

.footer-bar p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 18px, 1120px);
    margin: 12px auto;
  }

  .topbar,
  .footer-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-strip,
  .tools-row {
    grid-template-columns: 1fr;
  }

  .stake-field,
  .metric {
    min-height: 62px;
  }

  table {
    min-width: 680px;
  }

  .ghost-button,
  .primary-button {
    width: 100%;
  }
}
