        .breeding_scratch_container {
            max-width: 1000px;
            margin: 0 auto;
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .breeding_scratch_header {
            background: #228B22;
            color: white;
            padding: 16px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .breeding_scratch_header_left {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .breeding_scratch_close_btn {
            background: rgba(0, 0, 0, 0.2);
            border: none;
            color: white;
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-weight: bold;
            font-size: 14px;
            transition: background 0.2s;
        }

        .breeding_scratch_close_btn:hover {
            background: rgba(0, 0, 0, 0.3);
        }

        .breeding_scratch_stable {
            font-size: 16px;
            font-weight: 500;
        }

        .breeding_scratch_header_right {
            display: flex;
            gap: 20px;
            font-size: 14px;
        }

        .breeding_scratch_content {
            padding: 30px;
        }

        .breeding_scratch_info_section {
            background: #f9f9f9;
            border-radius: 8px;
            padding: 25px;
            margin-bottom: 25px;
        }

        .breeding_scratch_info_grid {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .breeding_scratch_info_row {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }

        .breeding_scratch_info_item {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .breeding_scratch_info_label {
            font-size: 12px;
            color: #666;
            text-transform: uppercase;
            font-weight: 600;
        }

        .breeding_scratch_info_value {
            font-size: 16px;
            color: #333;
            font-weight: 500;
        }

        .breeding_scratch_form_section {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 25px;
        }

        .breeding_scratch_field {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .breeding_scratch_field.breeding_scratch_hidden {
            display: none;
        }

        .breeding_scratch_field_label {
            font-size: 14px;
            color: #333;
            font-weight: 600;
        }

        .breeding_scratch_select,
        .breeding_scratch_input {
            padding: 10px 12px;
            border: 2px solid #ddd;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.2s;
            background: white;
        }

        .breeding_scratch_select:focus,
        .breeding_scratch_input:focus {
            outline: none;
            border-color: #228B22;
        }

        .breeding_scratch_age_wrapper {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .breeding_scratch_age_select {
            width: 70px;
        }

        .breeding_scratch_age_note {
            font-size: 13px;
            color: #666;
            flex-basis: 100%;
        }

        .breeding_scratch_radio_group {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }

        .breeding_scratch_radio_label {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            font-size: 14px;
        }

        .breeding_scratch_radio_label input[type="radio"] {
            cursor: pointer;
            width: 16px;
            height: 16px;
        }

        .breeding_scratch_error {
            color: #dc3545;
            font-size: 13px;
            margin-top: 4px;
            font-weight: 600;
        }

        .breeding_scratch_cost_section {
            background: #f9f9f9;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 20px;
        }

        .breeding_scratch_cost_title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 15px;
            color: #333;
        }

        .breeding_scratch_cost_row {
            display: flex;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid #e0e0e0;
            font-size: 14px;
        }

        .breeding_scratch_cost_row:last-child {
            border-bottom: none;
            font-weight: 600;
            margin-top: 5px;
        }

        .breeding_scratch_footer {
            background: #f9f9f9;
            padding: 20px 30px;
            display: flex;
            flex-direction: column;
            gap: 15px;
            border-top: 1px solid #e0e0e0;
        }

        .breeding_scratch_footer_alert {
            background: #f8d7da;
            border: 2px solid #dc3545;
            color: #721c24;
            padding: 12px 16px;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
            display: none;
        }

        .breeding_scratch_footer_alert.breeding_scratch_show {
            display: block;
        }

        .breeding_scratch_footer_content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
        }

        .breeding_scratch_message {
            flex: 1;
            color: #333;
            font-size: 14px;
        }

        .breeding_scratch_breed_btn {
            background: #228B22;
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 6px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
        }

        .breeding_scratch_breed_btn:hover {
            background: #1a6b1a;
        }

        .breeding_scratch_breed_btn:active {
            transform: scale(0.98);
        }

        @media (max-width: 768px) {

            .breeding_scratch_header {
                flex-direction: column;
                gap: 10px;
                align-items: flex-start;
            }

            .breeding_scratch_header_right {
                width: 100%;
                justify-content: space-between;
            }

            .breeding_scratch_content {
                padding: 20px;
            }

            .breeding_scratch_form_section {
                grid-template-columns: 1fr;
            }

            .breeding_scratch_footer_content {
                flex-direction: column;
                align-items: stretch;
            }

            .breeding_scratch_breed_btn {
                width: 100%;
            }
        }

        @media (max-width: 600px) {
            .breeding_scratch_info_row {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 480px) {

            .breeding_scratch_container {
                border-radius: 0;
            }
        }


.brp_body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: #f5f5f5;
  padding: 15px;
  line-height: 1.5;
}

.brp_container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

.brp_header {
  background: linear-gradient(180deg, #2d5016, #1f3a0f);
  color: white;
  padding: 20px;
}

.brp_summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.brp_summary_item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.brp_summary_label {
  font-weight: 500;
  opacity: 0.9;
}

.brp_summary_value {
  font-weight: 700;
  font-size: 1.1em;
}

.brp_controls {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.brp_control_group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.brp_control_group label {
  font-weight: 500;
}

.brp_select {
  padding: 8px 12px;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15);
  color: white;
  border-radius: 6px;
  font-size: 16px;
  min-width: 80px;
}

.brp_select option {
  color: #333;
}

.brp_btn {
  padding: 10px 24px;
  border: none;
  background: #ffc107;
  color: #000;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.brp_btn:hover {
  background: #ffcd38;
  transform: translateY(-1px);
}

.brp_btn:active {
  transform: translateY(0);
}

.brp_races {
  padding: 20px;
}

.brp_race_header {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  padding: 12px;
  background: #f8f9fa;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 2px solid #2d5016;
  margin-bottom: 10px;
}

.brp_race_header_item {
  text-align: center;
}

.brp_race_row {
  border-bottom: 1px solid #e0e0e0;
  transition: background 0.2s;
}

.brp_race_row:hover {
  background: #f8f9fa;
}

.brp_race_visible {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  padding: 12px;
  align-items: center;
  cursor: pointer;
}

.brp_race_cell {
  text-align: center;
}

.brp_race_cell select {
  width: 100%;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.brp_race_cost {
  font-weight: 700;
  color: #2d5016;
}

.brp_copy_btn {
  background: #28a745;
  border: none;
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.brp_copy_btn:hover {
  background: #218838;
}

.brp_race_hidden {
  display: none;
  padding: 20px;
  background: #fff9e6;
  border-top: 1px solid #e0e0e0;
}

.brp_race_hidden.brp_show {
  display: block;
}

.brp_hidden_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.brp_hidden_item {
  display: flex;
  gap: 10px;
}

.brp_hidden_label {
  font-weight: 600;
  color: #666;
  min-width: 80px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .brp_body {
    padding: 10px;
  }
  
  .brp_header {
    padding: 15px;
  }
  
  .brp_summary {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .brp_controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .brp_control_group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .brp_select,
  .brp_btn {
    width: 100%;
  }
  
  .brp_race_header {
    display: none;
  }
  
  .brp_race_visible {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px;
  }
  
  .brp_race_cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  
  .brp_race_cell::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 10px;
  }
  
  .brp_race_cell select {
    max-width: 60%;
  }
  
  .brp_hidden_grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .brp_summary_item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}


