.prize-subtab:not(.active):not(:hover) { background: transparent; }

.prize-games {
  min-width: 0;
  display: grid;
  gap: 12px;
  color: var(--text);
}

.prize-games :is(h2, h3, p, dl, dd) { margin: 0; }
.prize-games h2 { font-size: 1.35rem; }
.prize-games h3 { font-size: 1rem; }

.prize-toolbar,
.prize-game-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.prize-tabs,
.prize-filters,
.prize-year,
.prize-month {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.prize-year > span { color: var(--text2); font-size: 13px; }
.prize-games :is(.prize-filters, .prize-month) .form-select { width: auto; max-width: 100%; }
.prize-month .btn { min-width: 32px; font-size: 17px; }

.prize-filters { position: relative; }
.prize-filters .prize-refresh { position: static; }
.prize-refresh .tooltip-text {
  left: auto;
  right: 0;
  bottom: calc(100% + 6px);
  max-width: 100%;
  transform: none;
}
.prize-refresh:focus-within .tooltip-text { visibility: visible; opacity: 1; }

.prize-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.prize-stats > div,
.prize-game-row,
.prize-empty {
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--ui-border-soft);
  border-radius: var(--ui-radius-md);
}

.prize-stats :is(dt, small),
.prize-meta,
.prize-game-row span {
  color: var(--text2);
  font-size: 12px;
}

.prize-stats dd {
  margin-top: 3px;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.prize-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.prize-weekday {
  color: var(--text2);
  font-size: 11px;
  font-weight: 750;
  padding: 0 6px 3px;
  text-transform: uppercase;
}

.prize-day {
  border: 1px solid var(--ui-border-soft);
  border-radius: var(--ui-radius-sm);
  background: var(--surface);
  color: var(--text);
  min-height: 59px;
  min-width: 0;
  padding: 5px 7px;
  display: grid;
  align-content: start;
  gap: 2px;
  text-align: left;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.prize-day:not(:disabled) { cursor: pointer; }
.prize-day:not(:disabled):hover,
.prize-day:focus-visible { border-color: var(--accent); }
.prize-day.is-win { background: color-mix(in srgb, var(--surface) 92%, var(--green)); }
.prize-day-top { display: flex; align-items: center; justify-content: space-between; gap: 2px; }
.prize-day-top i { color: var(--text2); font: inherit; font-size: 11px; }
.prize-day small { color: var(--text2); line-height: 1.2; overflow-wrap: anywhere; }
.prize-day.is-win small, .prize-under { color: var(--green); }
.prize-over { color: var(--red); }
.prize-legend { line-height: 1.45; }

.prize-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--ui-radius-md);
}

.prize-table {
  width: 100%;
  min-width: 720px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
}

.prize-table :is(th, td) {
  padding: 4px 8px;
  text-align: right;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
}

.prize-table th:first-child { text-align: left; }
.prize-table tbody th { background: transparent; color: var(--text); }
.prize-table tfoot { font-weight: 800; background: var(--surface2); }
.prize-plan-button { min-height: 24px; padding: 2px 5px; text-align: left; }
.prize-plan-button span { color: var(--text2); }

.prize-games-list,
.prize-day-records,
.prize-fields { display: grid; gap: 8px; }
.prize-game-row > div { display: grid; gap: 3px; overflow-wrap: anywhere; }
.prize-fields { min-width: 0; border: 0; }
.prize-fields .form-label { margin-bottom: 0; }
.prize-fields .form-label :is(input, select) { margin-top: 4px; }
.prize-tax-details > summary { width: fit-content; max-width: 100%; color: var(--text2); font-size: 13px; cursor: pointer; }
.prize-tax-fields { margin-top: 8px; }

.prize-dialog {
  width: min(510px, calc(100% - 24px));
  max-width: none;
  max-height: min(90vh, 720px);
  margin: auto;
  color: var(--text);
  padding: 0;
  border-radius: var(--ui-radius-lg);
}

.prize-dialog > form { padding: 18px; }
.prize-dialog::backdrop { background: rgb(8 11 20 / 0.72); }
.prize-dialog-head { margin-bottom: 12px; }
.prize-dialog-head .btn { font-size: 17px; }
.prize-dialog .error-msg { margin-top: 12px; }

@media (max-width: 680px) {
  .prize-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prize-calendar { gap: 3px; }
  .prize-day { padding: 4px; min-height: 48px; }
  .prize-day small { font-size: 11px; }
  .prize-day-top strong { font-size: 13px; }
}
